public class JsonTableGroupScan extends MapRDBGroupScan implements IndexGroupScan
Modifier and Type | Field and Description |
---|---|
protected Map<org.apache.calcite.rex.RexNode,Double> |
forcedRowCountMap |
protected double |
fullTableEstimatedSize |
protected double |
fullTableRowCount |
protected int |
maxRecordsToRead
need only read maxRecordsToRead records.
|
protected int |
parallelizationWidth
Forced parallelization width
|
protected JsonScanSpec |
scanSpec |
static int |
STAR_COLS |
protected MapRDBStatistics |
stats |
static String |
TABLE_JSON |
columns, costFactor, doNotAccessRegionsToScan, endpointFragmentMapping, formatPlugin, formatPluginConfig, storagePlugin
INIT_ALLOCATION, initialAllocation, MAX_ALLOCATION, maxAllocation, userName
ALL_COLUMNS
Modifier | Constructor and Description |
---|---|
protected |
JsonTableGroupScan(JsonTableGroupScan that)
Private constructor, used for cloning.
|
|
JsonTableGroupScan(String userName,
AbstractStoragePlugin storagePlugin,
MapRDBFormatPlugin formatPlugin,
JsonScanSpec scanSpec,
List<SchemaPath> columns,
MapRDBStatistics stats,
TableMetadataProvider metadataProvider) |
|
JsonTableGroupScan(String userName,
AbstractStoragePlugin storagePlugin,
MapRDBFormatPlugin formatPlugin,
JsonScanSpec scanSpec,
List<SchemaPath> columns,
MetadataProviderManager metadataProviderManager) |
|
JsonTableGroupScan(String userName,
JsonScanSpec scanSpec,
FileSystemConfig storagePluginConfig,
MapRDBFormatPluginConfig formatPluginConfig,
List<SchemaPath> columns,
TupleMetadata schema,
StoragePluginRegistry pluginRegistry) |
Modifier and Type | Method and Description |
---|---|
GroupScan |
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.
|
GroupScan |
clone(JsonScanSpec scanSpec) |
GroupScan |
clone(List<SchemaPath> columns)
Returns a clone of GroupScan instance, except that the new GroupScan will use the provided list of columns .
|
org.ojai.store.QueryCondition |
convertToQueryCondition(LogicalExpression condition)
Convert a given
LogicalExpression condition into a QueryCondition condition |
MapRDBStatisticsPayload |
getAverageRowSizeStats(IndexDescriptor index)
Get the estimated average rowsize.
|
List<SchemaPath> |
getColumns()
Returns a list of columns scanned by this group scan
|
MapRDBStatisticsPayload |
getFirstKeyEstimatedStats(org.ojai.store.QueryCondition condition,
IndexDescriptor index,
org.apache.calcite.rel.RelNode scanRel)
Get the estimated statistics after applying the
RexNode condition. |
com.mapr.db.index.IndexDesc |
getIndexDesc() |
int |
getMaxParallelizationWidth() |
PhysicalOperator |
getNewWithChildren(List<PhysicalOperator> children)
Regenerate with this node with a new set of children.
|
PartitionFunction |
getRangePartitionFunction(List<FieldReference> refList)
Get a partition function instance for range based partitioning
|
protected NavigableMap<TabletFragmentInfo,String> |
getRegionsToScan() |
protected NavigableMap<TabletFragmentInfo,String> |
getRegionsToScan(int scanRangeSizeMB) |
RestrictedJsonTableGroupScan |
getRestrictedScan(List<SchemaPath> columns)
If this DbGroupScan supports restricted scan, create a restricted scan from this DbGroupScan.
|
double |
getRowCount(org.apache.calcite.rex.RexNode condition,
org.apache.calcite.rel.RelNode scanRel)
Get the row count after applying the
RexNode condition |
JsonScanSpec |
getScanSpec() |
ScanStats |
getScanStats() |
MapRDBSubScan |
getSpecificScan(int minorFragmentId) |
MapRDBStatistics |
getStatistics()
Get the statistics for this
DbGroupScan |
protected MapRDBSubScanSpec |
getSubScanSpec(TabletFragmentInfo tfi) |
String |
getTableName() |
boolean |
isDisablePushdown() |
boolean |
isDistributed() |
boolean |
isIndexScan() |
void |
setColumns(List<SchemaPath> columns) |
void |
setParallelizationWidth(int width) |
void |
setRowCount(org.apache.calcite.rex.RexNode condition,
double count,
double capRowCount)
Set the row count resulting from applying the
RexNode condition. |
void |
setStatistics(Statistics statistics)
Set the statistics for
IndexGroupScan |
boolean |
supportsLimitPushdown()
Checks if Json table reader supports limit push down.
|
boolean |
supportsRestrictedScan()
Whether this DbGroupScan supports creating a restricted (skip) scan
|
boolean |
supportsSecondaryIndex() |
String |
toString() |
applyAssignments, getDigest, getFormatPlugin, getIndexHint, getMetadataProvider, getOperatorAffinity, getPluginCostModel, getRowKeyOrdinal, getSchema, getSecondaryIndexCollection, getStorageConfig, getStoragePlugin, getTableMetadata, isFilterPushedDown, resetRegionsToScan, setCostFactor, setFilterPushedDown, setRegionsToScan
getRowKeyName, getRowKeyPath, isRestrictedScan
accept, applyFilter, enforceWidth, getAnalyzeInfoProvider, getColumnValueCount, getDistributionAffinity, getFiles, getFilter, getInitialAllocation, getMaxAllocation, getMinParallelizationWidth, getOperatorType, getPartitionColumns, getScanStats, getScanStats, getSelectionRoot, hasFiles, isExecutable, iterator, supportsFilterPushDown, supportsPartitionFilterPushdown, usedMetastore
accept, getCost, getOperatorId, getSVMode, getUserName, isBufferedOperator, setCost, setMaxAllocation, setOperatorId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getRowKeyOrdinal
applyAssignments, applyFilter, enforceWidth, getAnalyzeInfoProvider, getColumnValueCount, getDigest, getFiles, getFilter, getMetadataProvider, getMinParallelizationWidth, getPartitionColumns, getScanStats, getScanStats, getSelectionRoot, getTableMetadata, hasFiles, supportsFilterPushDown, supportsPartitionFilterPushdown, usedMetastore
accept, getCost, getInitialAllocation, getMaxAllocation, getOperatorId, getOperatorType, getSVMode, getUserName, isBufferedOperator, isExecutable, setCost, setMaxAllocation, setOperatorId
accept
forEach, iterator, spliterator
getDistributionAffinity, getOperatorAffinity
public static final int STAR_COLS
public static final String TABLE_JSON
protected MapRDBStatistics stats
protected JsonScanSpec scanSpec
protected double fullTableRowCount
protected double fullTableEstimatedSize
protected int maxRecordsToRead
protected int parallelizationWidth
public JsonTableGroupScan(String userName, JsonScanSpec scanSpec, FileSystemConfig storagePluginConfig, MapRDBFormatPluginConfig formatPluginConfig, List<SchemaPath> columns, TupleMetadata schema, StoragePluginRegistry pluginRegistry) throws ExecutionSetupException
ExecutionSetupException
public JsonTableGroupScan(String userName, AbstractStoragePlugin storagePlugin, MapRDBFormatPlugin formatPlugin, JsonScanSpec scanSpec, List<SchemaPath> columns, MetadataProviderManager metadataProviderManager)
public JsonTableGroupScan(String userName, AbstractStoragePlugin storagePlugin, MapRDBFormatPlugin formatPlugin, JsonScanSpec scanSpec, List<SchemaPath> columns, MapRDBStatistics stats, TableMetadataProvider metadataProvider)
protected JsonTableGroupScan(JsonTableGroupScan that)
that
- The HBaseGroupScan to clonepublic GroupScan clone(List<SchemaPath> columns)
GroupScan
clone
in interface GroupScan
clone
in class AbstractGroupScan
public GroupScan clone(JsonScanSpec scanSpec)
protected NavigableMap<TabletFragmentInfo,String> getRegionsToScan()
getRegionsToScan
in class MapRDBGroupScan
protected NavigableMap<TabletFragmentInfo,String> getRegionsToScan(int scanRangeSizeMB)
protected MapRDBSubScanSpec getSubScanSpec(TabletFragmentInfo tfi)
getSubScanSpec
in class MapRDBGroupScan
public MapRDBSubScan getSpecificScan(int minorFragmentId)
getSpecificScan
in interface GroupScan
public ScanStats getScanStats()
getScanStats
in class AbstractGroupScan
public PhysicalOperator getNewWithChildren(List<PhysicalOperator> children)
PhysicalOperator
getNewWithChildren
in interface PhysicalOperator
public String getTableName()
getTableName
in class MapRDBGroupScan
public com.mapr.db.index.IndexDesc getIndexDesc()
public boolean isDisablePushdown()
public boolean canPushdownProjects(List<SchemaPath> columns)
GroupScan
canPushdownProjects
in interface GroupScan
canPushdownProjects
in class MapRDBGroupScan
public JsonScanSpec getScanSpec()
public boolean supportsSecondaryIndex()
supportsSecondaryIndex
in interface DbGroupScan
supportsSecondaryIndex
in class AbstractDbGroupScan
public boolean isIndexScan()
isIndexScan
in interface DbGroupScan
public boolean supportsRestrictedScan()
DbGroupScan
supportsRestrictedScan
in interface DbGroupScan
supportsRestrictedScan
in class AbstractDbGroupScan
public RestrictedJsonTableGroupScan getRestrictedScan(List<SchemaPath> columns)
DbGroupScan
getRestrictedScan
in interface DbGroupScan
getRestrictedScan
in class AbstractDbGroupScan
columns
- list of column pathspublic MapRDBStatisticsPayload getAverageRowSizeStats(IndexDescriptor index)
index
- to use for generating the estimatepublic MapRDBStatisticsPayload getFirstKeyEstimatedStats(org.ojai.store.QueryCondition condition, IndexDescriptor index, org.apache.calcite.rel.RelNode scanRel)
RexNode
condition. DO NOT call this API directly.
Call the stats API instead which modifies the counts based on preference options.condition
- filter to applyindex
- to use for generating the estimatescanRel
- the current scan relpublic void setRowCount(org.apache.calcite.rex.RexNode condition, double count, double capRowCount)
RexNode
condition. Forced row counts will take
precedence over stats row countssetRowCount
in interface DbGroupScan
setRowCount
in interface IndexGroupScan
condition
- filter to applycount
- row countcapRowCount
- row count limitpublic void setStatistics(Statistics statistics)
IndexGroupScan
IndexGroupScan
setStatistics
in interface IndexGroupScan
statistics
- which is necessary for index planningpublic double getRowCount(org.apache.calcite.rex.RexNode condition, org.apache.calcite.rel.RelNode scanRel)
RexNode
conditiongetRowCount
in interface DbGroupScan
getRowCount
in interface IndexGroupScan
condition
- filter to applyscanRel
- the current scan relpublic boolean isDistributed()
isDistributed
in interface GroupScan
isDistributed
in class AbstractGroupScan
public MapRDBStatistics getStatistics()
DbGroupScan
DbGroupScan
getStatistics
in interface DbGroupScan
Statistics
for this Scanpublic void setColumns(List<SchemaPath> columns)
setColumns
in interface IndexGroupScan
public List<SchemaPath> getColumns()
GroupScan
getColumns
in interface DbGroupScan
getColumns
in interface GroupScan
getColumns
in interface IndexGroupScan
getColumns
in class MapRDBGroupScan
public PartitionFunction getRangePartitionFunction(List<FieldReference> refList)
DbGroupScan
getRangePartitionFunction
in interface DbGroupScan
getRangePartitionFunction
in class AbstractDbGroupScan
refList
- a list of FieldReference exprs that are participating in the range partitioningpublic org.ojai.store.QueryCondition convertToQueryCondition(LogicalExpression condition)
LogicalExpression
condition into a QueryCondition
conditioncondition
- expressed as a LogicalExpression
QueryCondition
condition equivalent to the given expressionpublic boolean supportsLimitPushdown()
supportsLimitPushdown
in interface GroupScan
supportsLimitPushdown
in class AbstractGroupScan
public GroupScan applyLimit(int maxRecords)
AbstractGroupScan
applyLimit
in interface GroupScan
applyLimit
in class AbstractGroupScan
maxRecords
- : the number of rows requested from group scan.public int getMaxParallelizationWidth()
getMaxParallelizationWidth
in interface GroupScan
getMaxParallelizationWidth
in class MapRDBGroupScan
public void setParallelizationWidth(int width)
setParallelizationWidth
in interface IndexGroupScan
Copyright © 1970 The Apache Software Foundation. All rights reserved.