use of org.apache.carbondata.core.scan.result.iterator.ColumnDriftRawResultIterator in project carbondata by apache.
the class CarbonCompactionExecutor method getRawResultIterator.
private RawResultIterator getRawResultIterator(Configuration configuration, String segmentId, String task, List<TableBlockInfo> tableBlockInfoList) throws IOException {
SegmentProperties sourceSegmentProperties = new SegmentProperties(tableBlockInfoList.get(0).getDataFileFooter().getColumnInTable());
boolean hasColumnDrift = carbonTable.hasColumnDrift() && RestructureUtil.hasColumnDriftOnSegment(carbonTable, sourceSegmentProperties);
if (hasColumnDrift) {
return new ColumnDriftRawResultIterator(executeBlockList(tableBlockInfoList, segmentId, task, configuration), sourceSegmentProperties, destinationSegProperties);
} else {
if (restructuredBlockExists) {
sourceSegmentProperties = getSourceSegmentProperties(Collections.singletonList(tableBlockInfoList.get(0).getDataFileFooter()));
}
return new RawResultIterator(executeBlockList(tableBlockInfoList, segmentId, task, configuration), sourceSegmentProperties, destinationSegProperties, true);
}
}
Aggregations