Class GoogleSheetsGroupScan
java.lang.Object
org.apache.drill.exec.physical.base.AbstractBase
org.apache.drill.exec.physical.base.AbstractGroupScan
org.apache.drill.exec.store.googlesheets.GoogleSheetsGroupScan
- All Implemented Interfaces:
Iterable<PhysicalOperator>
,GraphValue<PhysicalOperator>
,FragmentLeaf
,GroupScan
,HasAffinity
,Leaf
,PhysicalOperator
,Scan
-
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
ConstructorDescriptionGoogleSheetsGroupScan
(String userName, GoogleSheetsScanSpec scanSpec, List<SchemaPath> columns, Map<String, ExprNode.ColRelOpConstNode> filters, double selectivity, int maxRecords, StoragePluginRegistry plugins) GoogleSheetsGroupScan
(String userName, GoogleSheetsScanSpec scanSpec, GoogleSheetsStoragePlugin plugin, MetadataProviderManager metadataProviderManager) GoogleSheetsGroupScan
(GoogleSheetsGroupScan that, int maxRecords) Constructor for applying a limit.GoogleSheetsGroupScan
(GoogleSheetsGroupScan that, List<SchemaPath> columns) Constructor for applying columns (Projection pushdown).GoogleSheetsGroupScan
(GoogleSheetsGroupScan that, Map<String, ExprNode.ColRelOpConstNode> filters, double filterSelectivity) Constructor for applying a filter -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
applyAssignments
(List<CoordinationProtos.DrillbitEndpoint> endpoints) 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 .columns()
config()
boolean
filters()
Returns a signature of theGroupScan
which should usually be composed of all its attributes which could describe it uniquely.int
ReturnsTableMetadataProvider
instance which is used for providing metadata for currentGroupScan
.getNewWithChildren
(List<PhysicalOperator> children) Regenerate with this node with a new set of children.getSpecificScan
(int minorFragmentId) boolean
int
hashCode()
int
scanSpec()
boolean
Default is not to support limit pushdown.toString()
Methods inherited from class org.apache.drill.exec.physical.base.AbstractGroupScan
accept, applyFilter, enforceWidth, getAnalyzeInfoProvider, getColumns, getColumnValueCount, getDistributionAffinity, getFiles, getFilter, getInitialAllocation, getMaxAllocation, getMinParallelizationWidth, getOperatorAffinity, getOperatorType, getPartitionColumns, getScanStats, getScanStats, getSelectionRoot, 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, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.drill.common.graph.GraphValue
accept
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.apache.drill.exec.physical.base.PhysicalOperator
getCost, getOperatorId, getSVMode, getUserName, isBufferedOperator, setCost, setMaxAllocation, setOperatorId
-
Constructor Details
-
GoogleSheetsGroupScan
public GoogleSheetsGroupScan(String userName, GoogleSheetsScanSpec scanSpec, GoogleSheetsStoragePlugin plugin, MetadataProviderManager metadataProviderManager) -
GoogleSheetsGroupScan
-
GoogleSheetsGroupScan
Constructor for applying a limit.- Parameters:
that
- The previous group scan without the limit.maxRecords
- The desired limit, pushed down from Calcite
-
GoogleSheetsGroupScan
Constructor for applying columns (Projection pushdown).- Parameters:
that
- The previous GroupScan, without the columnscolumns
- The list of columns to push down
-
GoogleSheetsGroupScan
public GoogleSheetsGroupScan(GoogleSheetsGroupScan that, Map<String, ExprNode.ColRelOpConstNode> filters, double filterSelectivity) Constructor for applying a filter- Parameters:
that
- Previous group scan w/o filtersfilters
- The list of filtersfilterSelectivity
- The filter selectivity
-
GoogleSheetsGroupScan
public GoogleSheetsGroupScan(String userName, GoogleSheetsScanSpec scanSpec, List<SchemaPath> columns, Map<String, ExprNode.ColRelOpConstNode> filters, double selectivity, int maxRecords, StoragePluginRegistry plugins)
-
-
Method Details
-
scanSpec
-
config
-
columns
-
filters
-
maxRecords
public int maxRecords() -
applyAssignments
-
getSchema
-
getTableMetadata
- Specified by:
getTableMetadata
in interfaceGroupScan
- Overrides:
getTableMetadata
in classAbstractGroupScan
-
getMetadataProvider
Description copied from interface:GroupScan
ReturnsTableMetadataProvider
instance which is used for providing metadata for currentGroupScan
.- Specified by:
getMetadataProvider
in interfaceGroupScan
- Overrides:
getMetadataProvider
in classAbstractGroupScan
- Returns:
TableMetadataProvider
instance the source of metadata
-
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
- Overrides:
canPushdownProjects
in classAbstractGroupScan
-
allowsFilters
public boolean allowsFilters() -
getSpecificScan
-
getMaxParallelizationWidth
public int getMaxParallelizationWidth() -
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
-
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.
-
getDigest
Description copied from interface:GroupScan
Returns a signature of theGroupScan
which should usually be composed of all its attributes which could describe it uniquely. -
getScanStats
- Overrides:
getScanStats
in classAbstractGroupScan
-
hasFilters
public boolean hasFilters() -
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. -
hashCode
public int hashCode() -
equals
-
toString
-