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, userName
Fields inherited from interface org.apache.drill.exec.physical.base.GroupScan
ALL_COLUMNS
-
Constructor Summary
-
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.boolean
canPushdownProjects
(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 .boolean
Deprecated.ReturnsAnalyzeInfoProvider
instance which will be used when running ANALYZE statement.Returns a list of columns scanned by this group scanlong
getColumnValueCount
(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.long
long
ReturnsTableMetadataProvider
instance which is used for providing metadata for currentGroupScan
.int
At 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.Path
Returns path to the selection root.boolean
hasFiles()
Return true if this GroupScan can return its selection as a list of file names (retrieved by getFiles()).boolean
boolean
Describes whether or not a particular physical operator can actually be executed.iterator()
boolean
Checks whether this group scan supports filter push down.boolean
Default is not to support limit pushdown.boolean
Whether or not this GroupScan supports pushdown of partition filters (directories for filesystems)boolean
Returnstrue
if 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, setOperatorId
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.drill.common.graph.GraphValue
accept
Methods inherited from interface org.apache.drill.exec.physical.base.GroupScan
applyAssignments, getDigest, getMaxParallelizationWidth, getSpecificScan
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods 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:
iterator
in interfaceIterable<PhysicalOperator>
-
getOperatorAffinity
Description copied from interface:HasAffinity
Get the list of Endpoints with associated affinities that this operator has preference for.- Specified by:
getOperatorAffinity
in interfaceHasAffinity
- Returns:
- List of EndpointAffinity objects.
-
isExecutable
public boolean isExecutable()Description copied from interface:PhysicalOperator
Describes 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:
isExecutable
in interfacePhysicalOperator
- Overrides:
isExecutable
in classAbstractBase
-
accept
public <T,X, T acceptE extends Throwable> (PhysicalVisitor<T, X, throws EE> physicalVisitor, X value) Description copied from interface:PhysicalOperator
Provides capability to build a set of output based on traversing a query graph tree.- Specified by:
accept
in interfacePhysicalOperator
- Throws:
E extends Throwable
-
clone
Description copied from interface:GroupScan
Returns a clone of GroupScan instance, except that the new GroupScan will use the provided list of columns . -
isDistributed
public boolean isDistributed()- Specified by:
isDistributed
in interfaceGroupScan
-
getMinParallelizationWidth
public int getMinParallelizationWidth()Description copied from interface:GroupScan
At minimum, the GroupScan requires these many fragments to run. Currently, this is used inSimpleParallelizer
- Specified by:
getMinParallelizationWidth
in interfaceGroupScan
- Returns:
- the minimum number of fragments that should run
-
getScanStats
- Specified by:
getScanStats
in interfaceGroupScan
-
getScanStats
- Specified by:
getScanStats
in interfaceGroupScan
-
getScanStats
-
enforceWidth
Deprecated.Description copied from interface:GroupScan
Check if GroupScan enforces width to be maximum parallelization width. Currently, this is used inExcessiveExchangeIdentifier
- Specified by:
enforceWidth
in interfaceGroupScan
- Returns:
- if maximum width should be enforced
-
getInitialAllocation
public long getInitialAllocation()- Specified by:
getInitialAllocation
in interfacePhysicalOperator
- Overrides:
getInitialAllocation
in classAbstractBase
- Returns:
- The memory to preallocate for this operator
-
getMaxAllocation
public long getMaxAllocation()- Specified by:
getMaxAllocation
in interfacePhysicalOperator
- Overrides:
getMaxAllocation
in classAbstractBase
- Returns:
- The maximum memory this operator can allocate
-
canPushdownProjects
Description copied from interface:GroupScan
GroupScan should check the list of columns, and see if it could support all the columns in the list.- Specified by:
canPushdownProjects
in interfaceGroupScan
-
supportsPartitionFilterPushdown
public boolean supportsPartitionFilterPushdown()Description copied from interface:GroupScan
Whether or not this GroupScan supports pushdown of partition filters (directories for filesystems)- Specified by:
supportsPartitionFilterPushdown
in interfaceGroupScan
-
getColumnValueCount
By default, throw exception, since group scan does not have exact column value count.- Specified by:
getColumnValueCount
in interfaceGroupScan
-
getOperatorType
- Specified by:
getOperatorType
in interfacePhysicalOperator
-
getColumns
Description copied from interface:GroupScan
Returns a list of columns scanned by this group scan- Specified by:
getColumns
in interfaceGroupScan
-
getPartitionColumns
Description copied from interface:GroupScan
Returns a list of columns that can be used for partition pruning- Specified by:
getPartitionColumns
in interfaceGroupScan
-
supportsLimitPushdown
public boolean supportsLimitPushdown()Default is not to support limit pushdown.- Specified by:
supportsLimitPushdown
in 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:
applyLimit
in 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:GroupScan
Return 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:GroupScan
Returns path to the selection root. If this GroupScan cannot provide selection root, it returns null.- Specified by:
getSelectionRoot
in interfaceGroupScan
- Returns:
- path to the selection root
-
getFiles
Description copied from interface:GroupScan
Returns 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:HasAffinity
Get distribution affinity which describes the parallelization strategy of the operator.- Specified by:
getDistributionAffinity
in interfaceHasAffinity
-
getFilter
-
applyFilter
public GroupScan applyFilter(LogicalExpression filterExpr, UdfUtilities udfUtilities, FunctionImplementationRegistry functionImplementationRegistry, OptionManager optionManager) - Specified by:
applyFilter
in interfaceGroupScan
-
getMetadataProvider
Description copied from interface:GroupScan
ReturnsTableMetadataProvider
instance which is used for providing metadata for currentGroupScan
.- Specified by:
getMetadataProvider
in interfaceGroupScan
- Returns:
TableMetadataProvider
instance the source of metadata
-
getTableMetadata
- Specified by:
getTableMetadata
in interfaceGroupScan
-
usedMetastore
public boolean usedMetastore()Description copied from interface:GroupScan
Returnstrue
if current group scan uses metadata obtained from the Metastore.- Specified by:
usedMetastore
in interfaceGroupScan
- Returns:
true
if current group scan uses metadata obtained from the Metastore,false
otherwise.
-
getAnalyzeInfoProvider
Description copied from interface:GroupScan
ReturnsAnalyzeInfoProvider
instance which will be used when running ANALYZE statement.- Specified by:
getAnalyzeInfoProvider
in interfaceGroupScan
- Returns:
AnalyzeInfoProvider
instance
-
supportsFilterPushDown
public boolean supportsFilterPushDown()Description copied from interface:GroupScan
Checks whether this group scan supports filter push down.- Specified by:
supportsFilterPushDown
in interfaceGroupScan
- Returns:
true
if this group scan supports filter push down,false
otherwise
-