Class AbstractParquetGroupScan.RowGroupScanFilterer<B extends AbstractParquetGroupScan.RowGroupScanFilterer<B>>
java.lang.Object
org.apache.drill.exec.physical.base.AbstractGroupScanWithMetadata.GroupScanWithMetadataFilterer<B>
org.apache.drill.exec.store.parquet.AbstractParquetGroupScan.RowGroupScanFilterer<B>
- Enclosing class:
AbstractParquetGroupScan
protected abstract static class AbstractParquetGroupScan.RowGroupScanFilterer<B extends AbstractParquetGroupScan.RowGroupScanFilterer<B>>
extends AbstractGroupScanWithMetadata.GroupScanWithMetadataFilterer<B>
This class is responsible for filtering different metadata levels including row group level.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.google.common.collect.Multimap<org.apache.hadoop.fs.Path, RowGroupMetadata> Fields inherited from class org.apache.drill.exec.physical.base.AbstractGroupScanWithMetadata.GroupScanWithMetadataFilterer
context, files, filterExpression, limit, matchAllMetadata, nonInterestingColumnsMetadata, overflowLevel, partitions, segments, source, tableMetadata, tableSchema, udfUtilities -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Constructs required implementation ofAbstractGroupScanWithMetadatawith filtered metadata.protected voidfilterFileMetadata(OptionManager optionManager, FilterPredicate<?> filterPredicate, Set<SchemaPath> schemaPathsInExpr) Produces filtering of metadata at file level.protected voidfilterRowGroupMetadata(OptionManager optionManager, FilterPredicate<?> filterPredicate) Produces filtering of metadata at row group level.protected BgetFiltered(OptionManager optionManager, FilterPredicate<?> filterPredicate) Produces filtering of metadata and returnsAbstractGroupScanWithMetadata.GroupScanWithMetadataFiltererto construct resulting group scan.protected abstract AbstractParquetGroupScanReturns newAbstractParquetGroupScaninstance to be populated with filtered metadata from thisAbstractParquetGroupScan.RowGroupScanFiltererinstance.com.google.common.collect.Multimap<org.apache.hadoop.fs.Path, RowGroupMetadata> protected static <T extends BaseMetadata & LocationProvider>
com.google.common.collect.Multimap<org.apache.hadoop.fs.Path, T> pruneForSegments(com.google.common.collect.Multimap<org.apache.hadoop.fs.Path, T> metadataToPrune, Map<org.apache.hadoop.fs.Path, SegmentMetadata> filteredSegmentMetadata) Removes metadata which does not belong to any of segments in metadata list.rowGroups(com.google.common.collect.Multimap<org.apache.hadoop.fs.Path, RowGroupMetadata> rowGroups) Methods inherited from class org.apache.drill.exec.physical.base.AbstractGroupScanWithMetadata.GroupScanWithMetadataFilterer
context, files, filterAndGetMetadata, filterExpression, filterPartitionMetadata, filterSegmentMetadata, filterTableMetadata, getFiles, getImplicitColumnStatistics, getOverflowLevel, getPartitions, getSegments, getTableMetadata, isMatchAllMetadata, limit, matching, nonInterestingColumns, overflow, partitions, pruneForSegments, pruneForSegments, schema, segments, self, table, udfUtilities
-
Field Details
-
rowGroups
-
-
Constructor Details
-
RowGroupScanFilterer
-
-
Method Details
-
rowGroups
public B rowGroups(com.google.common.collect.Multimap<org.apache.hadoop.fs.Path, RowGroupMetadata> rowGroups) -
getNewScan
Returns newAbstractParquetGroupScaninstance to be populated with filtered metadata from thisAbstractParquetGroupScan.RowGroupScanFiltererinstance.- Returns:
- new
AbstractParquetGroupScaninstance
-
getRowGroups
public com.google.common.collect.Multimap<org.apache.hadoop.fs.Path,RowGroupMetadata> getRowGroups() -
build
Description copied from class:AbstractGroupScanWithMetadata.GroupScanWithMetadataFiltererConstructs required implementation ofAbstractGroupScanWithMetadatawith filtered metadata.- Specified by:
buildin classAbstractGroupScanWithMetadata.GroupScanWithMetadataFilterer<B extends AbstractParquetGroupScan.RowGroupScanFilterer<B>>- Returns:
- implementation of
AbstractGroupScanWithMetadatawith filtered metadata
-
getFiltered
Description copied from class:AbstractGroupScanWithMetadata.GroupScanWithMetadataFiltererProduces filtering of metadata and returnsAbstractGroupScanWithMetadata.GroupScanWithMetadataFiltererto construct resulting group scan.- Overrides:
getFilteredin classAbstractGroupScanWithMetadata.GroupScanWithMetadataFilterer<B extends AbstractParquetGroupScan.RowGroupScanFilterer<B>>- Parameters:
optionManager- option managerfilterPredicate- filter expression- Returns:
- this instance with filtered metadata
-
filterRowGroupMetadata
protected void filterRowGroupMetadata(OptionManager optionManager, FilterPredicate<?> filterPredicate) Produces filtering of metadata at row group level.- Parameters:
optionManager- option managerfilterPredicate- filter expression
-
filterFileMetadata
protected void filterFileMetadata(OptionManager optionManager, FilterPredicate<?> filterPredicate, Set<SchemaPath> schemaPathsInExpr) Produces filtering of metadata at file level.- Overrides:
filterFileMetadatain classAbstractGroupScanWithMetadata.GroupScanWithMetadataFilterer<B extends AbstractParquetGroupScan.RowGroupScanFilterer<B>>- Parameters:
optionManager- option managerfilterPredicate- filter expressionschemaPathsInExpr- columns used in filter expression
-
pruneForSegments
protected static <T extends BaseMetadata & LocationProvider> com.google.common.collect.Multimap<org.apache.hadoop.fs.Path,T> pruneForSegments(com.google.common.collect.Multimap<org.apache.hadoop.fs.Path, T> metadataToPrune, Map<org.apache.hadoop.fs.Path, SegmentMetadata> filteredSegmentMetadata) Removes metadata which does not belong to any of segments in metadata list.- Type Parameters:
T- type of metadata to filter- Parameters:
metadataToPrune- list of metadata which should be prunedfilteredSegmentMetadata- list of segment metadata which was pruned- Returns:
- multimap with metadata which belongs to pruned segments
-