Class AbstractGroupScan
java.lang.Object
org.apache.drill.exec.physical.base.AbstractBase
org.apache.drill.exec.physical.base.AbstractGroupScan
- All Implemented Interfaces:
Iterable<PhysicalOperator>,GraphValue<PhysicalOperator>,FragmentLeaf,GroupScan,HasAffinity,Leaf,PhysicalOperator,Scan
- Direct Known Subclasses:
AbstractDbGroupScan,AbstractFileGroupScan,DirectGroupScan,DrillGroupScan,DruidGroupScan,EnumerableGroupScan,GoogleSheetsGroupScan,HBaseGroupScan,HiveScan,HttpGroupScan,IcebergGroupScan,InfoSchemaGroupScan,JdbcGroupScan,KafkaGroupScan,KuduGroupScan,MockGroupScanPOP,MongoGroupScan,OpenTSDBGroupScan,PhoenixGroupScan,SplunkGroupScan,SystemTableScan
-
Field Summary
Fields inherited from class org.apache.drill.exec.physical.base.AbstractBase
INIT_ALLOCATION, initialAllocation, MAX_ALLOCATION, maxAllocation, userNameFields inherited from interface org.apache.drill.exec.physical.base.GroupScan
ALL_COLUMNS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T,X, E extends Throwable>
Taccept(PhysicalVisitor<T, X, E> physicalVisitor, X value) Provides capability to build a set of output based on traversing a query graph tree.applyFilter(LogicalExpression filterExpr, UdfUtilities udfUtilities, FunctionImplementationRegistry functionImplementationRegistry, OptionManager optionManager) applyLimit(int maxRecords) By default, return null to indicate row count based prune is not supported.booleancanPushdownProjects(List<SchemaPath> columns) GroupScan should check the list of columns, and see if it could support all the columns in the list.clone(List<SchemaPath> columns) Returns a clone of GroupScan instance, except that the new GroupScan will use the provided list of columns .booleanDeprecated.ReturnsAnalyzeInfoProviderinstance which will be used when running ANALYZE statement.Returns a list of columns scanned by this group scanlonggetColumnValueCount(SchemaPath column) By default, throw exception, since group scan does not have exact column value count.Get distribution affinity which describes the parallelization strategy of the operator.Collection<org.apache.hadoop.fs.Path> getFiles()Returns a collection of file names associated with this GroupScan.longlongReturnsTableMetadataProviderinstance which is used for providing metadata for currentGroupScan.intAt minimum, the GroupScan requires these many fragments to run.Get the list of Endpoints with associated affinities that this operator has preference for.Returns a list of columns that can be used for partition pruninggetScanStats(org.apache.calcite.rel.metadata.RelMetadataQuery mq) getScanStats(PlannerSettings settings) org.apache.hadoop.fs.PathReturns path to the selection root.booleanhasFiles()Return true if this GroupScan can return its selection as a list of file names (retrieved by getFiles()).booleanbooleanDescribes whether or not a particular physical operator can actually be executed.iterator()booleanChecks whether this group scan supports filter push down.booleanDefault is not to support limit pushdown.booleanWhether or not this GroupScan supports pushdown of partition filters (directories for filesystems)booleanReturnstrueif current group scan uses metadata obtained from the Metastore.Methods inherited from class org.apache.drill.exec.physical.base.AbstractBase
accept, getCost, getOperatorId, getSVMode, getUserName, isBufferedOperator, setCost, setMaxAllocation, setOperatorIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.drill.common.graph.GraphValue
acceptMethods inherited from interface org.apache.drill.exec.physical.base.GroupScan
applyAssignments, getDigest, getMaxParallelizationWidth, getSpecificScanMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.apache.drill.exec.physical.base.PhysicalOperator
getCost, getNewWithChildren, getOperatorId, getSVMode, getUserName, isBufferedOperator, setCost, setMaxAllocation, setOperatorId
-
Constructor Details
-
AbstractGroupScan
-
AbstractGroupScan
-
-
Method Details
-
iterator
- Specified by:
iteratorin interfaceIterable<PhysicalOperator>
-
getOperatorAffinity
Description copied from interface:HasAffinityGet the list of Endpoints with associated affinities that this operator has preference for.- Specified by:
getOperatorAffinityin interfaceHasAffinity- Returns:
- List of EndpointAffinity objects.
-
isExecutable
public boolean isExecutable()Description copied from interface:PhysicalOperatorDescribes whether or not a particular physical operator can actually be executed. Most physical operators can be executed. However, Exchange nodes cannot be executed. In order to be executed, they must be converted into their Exec sub components.- Specified by:
isExecutablein interfacePhysicalOperator- Overrides:
isExecutablein classAbstractBase
-
accept
public <T,X, T acceptE extends Throwable> (PhysicalVisitor<T, X, throws EE> physicalVisitor, X value) Description copied from interface:PhysicalOperatorProvides capability to build a set of output based on traversing a query graph tree.- Specified by:
acceptin interfacePhysicalOperator- Parameters:
physicalVisitor-- Throws:
E
-
clone
Description copied from interface:GroupScanReturns a clone of GroupScan instance, except that the new GroupScan will use the provided list of columns . -
isDistributed
public boolean isDistributed()- Specified by:
isDistributedin interfaceGroupScan
-
getMinParallelizationWidth
public int getMinParallelizationWidth()Description copied from interface:GroupScanAt minimum, the GroupScan requires these many fragments to run. Currently, this is used inSimpleParallelizer- Specified by:
getMinParallelizationWidthin interfaceGroupScan- Returns:
- the minimum number of fragments that should run
-
getScanStats
- Specified by:
getScanStatsin interfaceGroupScan
-
getScanStats
- Specified by:
getScanStatsin interfaceGroupScan
-
getScanStats
-
enforceWidth
Deprecated.Description copied from interface:GroupScanCheck if GroupScan enforces width to be maximum parallelization width. Currently, this is used inExcessiveExchangeIdentifier- Specified by:
enforceWidthin interfaceGroupScan- Returns:
- if maximum width should be enforced
-
getInitialAllocation
public long getInitialAllocation()- Specified by:
getInitialAllocationin interfacePhysicalOperator- Overrides:
getInitialAllocationin classAbstractBase- Returns:
- The memory to preallocate for this operator
-
getMaxAllocation
public long getMaxAllocation()- Specified by:
getMaxAllocationin interfacePhysicalOperator- Overrides:
getMaxAllocationin classAbstractBase- Returns:
- The maximum memory this operator can allocate
-
canPushdownProjects
Description copied from interface:GroupScanGroupScan should check the list of columns, and see if it could support all the columns in the list.- Specified by:
canPushdownProjectsin interfaceGroupScan
-
supportsPartitionFilterPushdown
public boolean supportsPartitionFilterPushdown()Description copied from interface:GroupScanWhether or not this GroupScan supports pushdown of partition filters (directories for filesystems)- Specified by:
supportsPartitionFilterPushdownin interfaceGroupScan
-
getColumnValueCount
By default, throw exception, since group scan does not have exact column value count.- Specified by:
getColumnValueCountin interfaceGroupScan
-
getOperatorType
- Specified by:
getOperatorTypein interfacePhysicalOperator
-
getColumns
Description copied from interface:GroupScanReturns a list of columns scanned by this group scan- Specified by:
getColumnsin interfaceGroupScan
-
getPartitionColumns
Description copied from interface:GroupScanReturns a list of columns that can be used for partition pruning- Specified by:
getPartitionColumnsin interfaceGroupScan
-
supportsLimitPushdown
public boolean supportsLimitPushdown()Default is not to support limit pushdown.- Specified by:
supportsLimitPushdownin interfaceGroupScan
-
applyLimit
By default, return null to indicate row count based prune is not supported. Each group scan subclass should override, if it supports row count based prune.- Specified by:
applyLimitin interfaceGroupScan- Parameters:
maxRecords- : the number of rows requested from group scan.- Returns:
- a new instance of group scan if the prune is successful. null when either if row-based prune is not supported, or if prune is not successful.
-
hasFiles
public boolean hasFiles()Description copied from interface:GroupScanReturn true if this GroupScan can return its selection as a list of file names (retrieved by getFiles()). -
getSelectionRoot
public org.apache.hadoop.fs.Path getSelectionRoot()Description copied from interface:GroupScanReturns path to the selection root. If this GroupScan cannot provide selection root, it returns null.- Specified by:
getSelectionRootin interfaceGroupScan- Returns:
- path to the selection root
-
getFiles
Description copied from interface:GroupScanReturns a collection of file names associated with this GroupScan. This should be called after checking hasFiles(). If this GroupScan cannot provide file names, it returns null. -
getDistributionAffinity
Description copied from interface:HasAffinityGet distribution affinity which describes the parallelization strategy of the operator.- Specified by:
getDistributionAffinityin interfaceHasAffinity
-
getFilter
-
applyFilter
public GroupScan applyFilter(LogicalExpression filterExpr, UdfUtilities udfUtilities, FunctionImplementationRegistry functionImplementationRegistry, OptionManager optionManager) - Specified by:
applyFilterin interfaceGroupScan
-
getMetadataProvider
Description copied from interface:GroupScanReturnsTableMetadataProviderinstance which is used for providing metadata for currentGroupScan.- Specified by:
getMetadataProviderin interfaceGroupScan- Returns:
TableMetadataProviderinstance the source of metadata
-
getTableMetadata
- Specified by:
getTableMetadatain interfaceGroupScan
-
usedMetastore
public boolean usedMetastore()Description copied from interface:GroupScanReturnstrueif current group scan uses metadata obtained from the Metastore.- Specified by:
usedMetastorein interfaceGroupScan- Returns:
trueif current group scan uses metadata obtained from the Metastore,falseotherwise.
-
getAnalyzeInfoProvider
Description copied from interface:GroupScanReturnsAnalyzeInfoProviderinstance which will be used when running ANALYZE statement.- Specified by:
getAnalyzeInfoProviderin interfaceGroupScan- Returns:
AnalyzeInfoProviderinstance
-
supportsFilterPushDown
public boolean supportsFilterPushDown()Description copied from interface:GroupScanChecks whether this group scan supports filter push down.- Specified by:
supportsFilterPushDownin interfaceGroupScan- Returns:
trueif this group scan supports filter push down,falseotherwise
-