Package org.apache.drill.exec.store.sys
Class SystemTableScan
java.lang.Object
org.apache.drill.exec.physical.base.AbstractBase
org.apache.drill.exec.physical.base.AbstractGroupScan
org.apache.drill.exec.store.sys.SystemTableScan
- All Implemented Interfaces:
Iterable<PhysicalOperator>
,GraphValue<PhysicalOperator>
,FragmentLeaf
,GroupScan
,HasAffinity
,Leaf
,PhysicalOperator
,Scan
,SubScan
-
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
ConstructorDescriptionSystemTableScan
(SystemTable table, int maxRecordsToRead, StoragePluginRegistry engineRegistry) SystemTableScan
(SystemTable table, int maxRecordsToRead, SystemTablePlugin plugin) SystemTableScan
(SystemTable table, SystemTablePlugin plugin) -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyAssignments
(List<CoordinationProtos.DrillbitEndpoint> endpoints) applyLimit
(int maxRecords) By default, return null to indicate row count based prune is not supported.clone
(List<SchemaPath> columns) Returns a clone of GroupScan instance, except that the new GroupScan will use the provided list of columns .clone
(SystemTableScan systemTableScan, int maxRecordsToRead) Returns a list of columns scanned by this group scanExample: SystemTableScan [table=OPTION, distributed=false, maxRecordsToRead=1]Get distribution affinity which describes the parallelization strategy of the operator.long
long
int
int
int
At minimum, the GroupScan requires these many fragments to run.getNewWithChildren
(List<PhysicalOperator> children) Regenerate with this node with a new set of children.If distributed, the scan needs to happen on every node.System tables do not need stats.getSpecificScan
(int minorFragmentId) getTable()
boolean
Default is not to support limit pushdown.Methods inherited from class org.apache.drill.exec.physical.base.AbstractGroupScan
accept, applyFilter, canPushdownProjects, enforceWidth, getAnalyzeInfoProvider, getColumnValueCount, getFiles, getFilter, getMetadataProvider, getPartitionColumns, getScanStats, getScanStats, getSelectionRoot, getTableMetadata, hasFiles, isDistributed, isExecutable, iterator, supportsFilterPushDown, supportsPartitionFilterPushdown, usedMetastore
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 java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface org.apache.drill.exec.physical.base.PhysicalOperator
accept, getCost, getOperatorId, getSVMode, getUserName, isBufferedOperator, isExecutable, setCost, setMaxAllocation, setOperatorId
-
Field Details
-
OPERATOR_TYPE
- See Also:
-
-
Constructor Details
-
SystemTableScan
public SystemTableScan(SystemTable table, int maxRecordsToRead, StoragePluginRegistry engineRegistry) throws ExecutionSetupException - Throws:
ExecutionSetupException
-
SystemTableScan
-
SystemTableScan
-
-
Method Details
-
getScanStats
System tables do not need stats.- Overrides:
getScanStats
in classAbstractGroupScan
- Returns:
- a trivial stats table
-
getNewWithChildren
Description copied from interface:PhysicalOperator
Regenerate with this node with a new set of children. This is used in the case of materialization or optimization.- Specified by:
getNewWithChildren
in interfacePhysicalOperator
-
applyAssignments
- Specified by:
applyAssignments
in interfaceGroupScan
-
getColumns
Description copied from interface:GroupScan
Returns a list of columns scanned by this group scan- Specified by:
getColumns
in interfaceGroupScan
- Overrides:
getColumns
in classAbstractGroupScan
-
getSpecificScan
- Specified by:
getSpecificScan
in interfaceGroupScan
-
getMaxParallelizationWidth
public int getMaxParallelizationWidth()- Specified by:
getMaxParallelizationWidth
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
- Overrides:
getMinParallelizationWidth
in classAbstractGroupScan
- Returns:
- the minimum number of fragments that should run
-
getInitialAllocation
public long getInitialAllocation()- Specified by:
getInitialAllocation
in interfacePhysicalOperator
- Overrides:
getInitialAllocation
in classAbstractGroupScan
- Returns:
- The memory to preallocate for this operator
-
getMaxAllocation
public long getMaxAllocation()- Specified by:
getMaxAllocation
in interfacePhysicalOperator
- Overrides:
getMaxAllocation
in classAbstractGroupScan
- Returns:
- The maximum memory this operator can allocate
-
getDigest
Example: SystemTableScan [table=OPTION, distributed=false, maxRecordsToRead=1] -
getOperatorType
- Specified by:
getOperatorType
in interfacePhysicalOperator
- Overrides:
getOperatorType
in classAbstractGroupScan
-
getOperatorAffinity
If distributed, the scan needs to happen on every node. Since width is enforced, the number of fragments equals number of Drillbits. And here we set, each endpoint as mandatory assignment required to ensure every Drillbit executes a fragment.- Specified by:
getOperatorAffinity
in interfaceHasAffinity
- Overrides:
getOperatorAffinity
in classAbstractGroupScan
- Returns:
- the Drillbit endpoint affinities
-
getDistributionAffinity
Description copied from interface:HasAffinity
Get distribution affinity which describes the parallelization strategy of the operator.- Specified by:
getDistributionAffinity
in interfaceHasAffinity
- Overrides:
getDistributionAffinity
in classAbstractGroupScan
-
clone
Description copied from interface:GroupScan
Returns a clone of GroupScan instance, except that the new GroupScan will use the provided list of columns .- Specified by:
clone
in interfaceGroupScan
- Overrides:
clone
in classAbstractGroupScan
-
clone
-
supportsLimitPushdown
public boolean supportsLimitPushdown()Description copied from class:AbstractGroupScan
Default is not to support limit pushdown.- Specified by:
supportsLimitPushdown
in interfaceGroupScan
- Overrides:
supportsLimitPushdown
in classAbstractGroupScan
-
applyLimit
Description copied from class:AbstractGroupScan
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
- Overrides:
applyLimit
in classAbstractGroupScan
- 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.
-
getTable
-
getMaxRecordsToRead
public int getMaxRecordsToRead() -
getPlugin
-