protected abstract static class AbstractGroupScanWithMetadata.GroupScanWithMetadataFilterer<B extends AbstractGroupScanWithMetadata.GroupScanWithMetadataFilterer<B>> extends Object
Modifier and Type | Field and Description |
---|---|
protected FunctionLookupContext |
context |
protected Map<org.apache.hadoop.fs.Path,FileMetadata> |
files |
protected LogicalExpression |
filterExpression |
protected int |
limit |
protected boolean |
matchAllMetadata |
protected NonInterestingColumnsMetadata |
nonInterestingColumnsMetadata |
protected MetadataType |
overflowLevel |
protected List<PartitionMetadata> |
partitions |
protected Map<org.apache.hadoop.fs.Path,SegmentMetadata> |
segments |
protected AbstractGroupScanWithMetadata<? extends TableMetadataProvider> |
source |
protected TableMetadata |
tableMetadata |
protected TupleMetadata |
tableSchema |
protected UdfUtilities |
udfUtilities |
Constructor and Description |
---|
GroupScanWithMetadataFilterer(AbstractGroupScanWithMetadata<?> source) |
Modifier and Type | Method and Description |
---|---|
abstract AbstractGroupScanWithMetadata<?> |
build()
Constructs required implementation of
AbstractGroupScanWithMetadata with filtered metadata. |
B |
context(FunctionLookupContext context) |
B |
files(Map<org.apache.hadoop.fs.Path,FileMetadata> files) |
<T extends Metadata> |
filterAndGetMetadata(Set<SchemaPath> schemaPathsInExpr,
Iterable<T> metadataList,
FilterPredicate<?> filterPredicate,
OptionManager optionManager)
Produces filtering of specified metadata using specified filter expression and returns filtered metadata.
|
B |
filterExpression(LogicalExpression filterExpression) |
protected void |
filterFileMetadata(OptionManager optionManager,
FilterPredicate<?> filterPredicate,
Set<SchemaPath> schemaPathsInExpr)
Produces filtering of metadata at file level.
|
protected void |
filterPartitionMetadata(OptionManager optionManager,
FilterPredicate<?> filterPredicate,
Set<SchemaPath> schemaPathsInExpr)
Produces filtering of metadata at partition level.
|
protected void |
filterSegmentMetadata(OptionManager optionManager,
FilterPredicate<?> filterPredicate,
Set<SchemaPath> schemaPathsInExpr)
Produces filtering of metadata at segment level.
|
protected void |
filterTableMetadata(FilterPredicate<?> filterPredicate,
Set<SchemaPath> schemaPathsInExpr)
Produces filtering of metadata at table level.
|
Map<org.apache.hadoop.fs.Path,FileMetadata> |
getFiles() |
protected B |
getFiltered(OptionManager optionManager,
FilterPredicate<?> filterPredicate)
Produces filtering of metadata and returns
AbstractGroupScanWithMetadata.GroupScanWithMetadataFilterer
to construct resulting group scan. |
MetadataType |
getOverflowLevel() |
List<PartitionMetadata> |
getPartitions() |
Map<org.apache.hadoop.fs.Path,SegmentMetadata> |
getSegments() |
TableMetadata |
getTableMetadata() |
boolean |
isMatchAllMetadata() |
B |
limit(int maxRecords) |
B |
matching(boolean matchAllMetadata) |
B |
nonInterestingColumns(NonInterestingColumnsMetadata nonInterestingColumns) |
B |
overflow(MetadataType overflowLevel) |
B |
partitions(List<PartitionMetadata> partitions) |
protected List<PartitionMetadata> |
pruneForSegments(List<PartitionMetadata> metadataToPrune,
Map<org.apache.hadoop.fs.Path,SegmentMetadata> filteredSegmentMetadata)
Removes metadata which does not belong to any of partitions in metadata list.
|
protected static <T extends BaseMetadata & LocationProvider> |
pruneForSegments(Map<org.apache.hadoop.fs.Path,T> metadataToPrune,
Map<org.apache.hadoop.fs.Path,SegmentMetadata> filteredSegmentMetadata)
Removes metadata which does not belong to any of partitions in metadata list.
|
B |
schema(TupleMetadata tableSchema) |
B |
segments(Map<org.apache.hadoop.fs.Path,SegmentMetadata> segments) |
protected abstract B |
self() |
B |
table(TableMetadata tableMetadata) |
B |
udfUtilities(UdfUtilities udfUtilities) |
protected final AbstractGroupScanWithMetadata<? extends TableMetadataProvider> source
protected boolean matchAllMetadata
protected TableMetadata tableMetadata
protected List<PartitionMetadata> partitions
protected Map<org.apache.hadoop.fs.Path,SegmentMetadata> segments
protected Map<org.apache.hadoop.fs.Path,FileMetadata> files
protected NonInterestingColumnsMetadata nonInterestingColumnsMetadata
protected LogicalExpression filterExpression
protected TupleMetadata tableSchema
protected UdfUtilities udfUtilities
protected FunctionLookupContext context
protected int limit
protected MetadataType overflowLevel
public GroupScanWithMetadataFilterer(AbstractGroupScanWithMetadata<?> source)
public abstract AbstractGroupScanWithMetadata<?> build()
AbstractGroupScanWithMetadata
with filtered metadata.AbstractGroupScanWithMetadata
with filtered metadatapublic B table(TableMetadata tableMetadata)
public B partitions(List<PartitionMetadata> partitions)
public B segments(Map<org.apache.hadoop.fs.Path,SegmentMetadata> segments)
public B nonInterestingColumns(NonInterestingColumnsMetadata nonInterestingColumns)
public B files(Map<org.apache.hadoop.fs.Path,FileMetadata> files)
public B limit(int maxRecords)
public B matching(boolean matchAllMetadata)
public B overflow(MetadataType overflowLevel)
public B filterExpression(LogicalExpression filterExpression)
public B schema(TupleMetadata tableSchema)
public B udfUtilities(UdfUtilities udfUtilities)
public B context(FunctionLookupContext context)
public boolean isMatchAllMetadata()
public TableMetadata getTableMetadata()
public List<PartitionMetadata> getPartitions()
public Map<org.apache.hadoop.fs.Path,SegmentMetadata> getSegments()
public Map<org.apache.hadoop.fs.Path,FileMetadata> getFiles()
public MetadataType getOverflowLevel()
protected B getFiltered(OptionManager optionManager, FilterPredicate<?> filterPredicate)
AbstractGroupScanWithMetadata.GroupScanWithMetadataFilterer
to construct resulting group scan.optionManager
- option managerfilterPredicate
- filter expressionprotected void filterTableMetadata(FilterPredicate<?> filterPredicate, Set<SchemaPath> schemaPathsInExpr)
filterPredicate
- filter expressionschemaPathsInExpr
- columns used in filter expressionprotected void filterSegmentMetadata(OptionManager optionManager, FilterPredicate<?> filterPredicate, Set<SchemaPath> schemaPathsInExpr)
optionManager
- option managerfilterPredicate
- filter expressionschemaPathsInExpr
- columns used in filter expressionprotected void filterPartitionMetadata(OptionManager optionManager, FilterPredicate<?> filterPredicate, Set<SchemaPath> schemaPathsInExpr)
optionManager
- option managerfilterPredicate
- filter expressionschemaPathsInExpr
- columns used in filter expressionprotected void filterFileMetadata(OptionManager optionManager, FilterPredicate<?> filterPredicate, Set<SchemaPath> schemaPathsInExpr)
optionManager
- option managerfilterPredicate
- filter expressionschemaPathsInExpr
- columns used in filter expressionprotected static <T extends BaseMetadata & LocationProvider> Map<org.apache.hadoop.fs.Path,T> pruneForSegments(Map<org.apache.hadoop.fs.Path,T> metadataToPrune, Map<org.apache.hadoop.fs.Path,SegmentMetadata> filteredSegmentMetadata)
T
- type of metadata to filtermetadataToPrune
- list of metadata which should be prunedfilteredSegmentMetadata
- list of segment metadata which was prunedprotected List<PartitionMetadata> pruneForSegments(List<PartitionMetadata> metadataToPrune, Map<org.apache.hadoop.fs.Path,SegmentMetadata> filteredSegmentMetadata)
metadataToPrune
- list of partition metadata which should be prunedfilteredSegmentMetadata
- list of segment metadata which was prunedpublic <T extends Metadata> List<T> filterAndGetMetadata(Set<SchemaPath> schemaPathsInExpr, Iterable<T> metadataList, FilterPredicate<?> filterPredicate, OptionManager optionManager)
T
- type of metadata to filterschemaPathsInExpr
- columns used in filter expressionmetadataList
- metadata to filterfilterPredicate
- filter expressionoptionManager
- option managerprotected abstract B self()
Copyright © 1970 The Apache Software Foundation. All rights reserved.