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, storagePluginINIT_ALLOCATION, initialAllocation, MAX_ALLOCATION, maxAllocationALL_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, setRegionsToScangetRowKeyName, getRowKeyPath, isRestrictedScanaccept, applyFilter, enforceWidth, getAnalyzeInfoProvider, getColumnValueCount, getDistributionAffinity, getFiles, getFilter, getInitialAllocation, getMaxAllocation, getMinParallelizationWidth, getOperatorType, getPartitionColumns, getScanStats, getSelectionRoot, hasFiles, isExecutable, iterator, supportsFilterPushDown, supportsPartitionFilterPushdown, usedMetastoreaccept, getCost, getOperatorId, getSVMode, getUserName, isBufferedOperator, setCost, setMaxAllocation, setOperatorIdclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetRowKeyOrdinalapplyAssignments, applyFilter, enforceWidth, getAnalyzeInfoProvider, getColumnValueCount, getDigest, getFiles, getFilter, getMetadataProvider, getMinParallelizationWidth, getPartitionColumns, getScanStats, getSelectionRoot, getTableMetadata, hasFiles, supportsFilterPushDown, supportsPartitionFilterPushdown, usedMetastoreaccept, getCost, getInitialAllocation, getMaxAllocation, getOperatorId, getOperatorType, getSVMode, getUserName, isBufferedOperator, isExecutable, setCost, setMaxAllocation, setOperatorIdacceptforEach, iterator, spliteratorgetDistributionAffinity, getOperatorAffinitypublic 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
ExecutionSetupExceptionpublic 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)
GroupScanclone in interface GroupScanclone in class AbstractGroupScanpublic GroupScan clone(JsonScanSpec scanSpec)
protected NavigableMap<TabletFragmentInfo,String> getRegionsToScan()
getRegionsToScan in class MapRDBGroupScanprotected NavigableMap<TabletFragmentInfo,String> getRegionsToScan(int scanRangeSizeMB)
protected MapRDBSubScanSpec getSubScanSpec(TabletFragmentInfo tfi)
getSubScanSpec in class MapRDBGroupScanpublic MapRDBSubScan getSpecificScan(int minorFragmentId)
getSpecificScan in interface GroupScanpublic ScanStats getScanStats()
getScanStats in class AbstractGroupScanpublic PhysicalOperator getNewWithChildren(List<PhysicalOperator> children)
PhysicalOperatorgetNewWithChildren in interface PhysicalOperatorpublic String getTableName()
getTableName in class MapRDBGroupScanpublic com.mapr.db.index.IndexDesc getIndexDesc()
public boolean isDisablePushdown()
public boolean canPushdownProjects(List<SchemaPath> columns)
GroupScancanPushdownProjects in interface GroupScancanPushdownProjects in class MapRDBGroupScanpublic JsonScanSpec getScanSpec()
public boolean supportsSecondaryIndex()
supportsSecondaryIndex in interface DbGroupScansupportsSecondaryIndex in class AbstractDbGroupScanpublic boolean isIndexScan()
isIndexScan in interface DbGroupScanpublic boolean supportsRestrictedScan()
DbGroupScansupportsRestrictedScan in interface DbGroupScansupportsRestrictedScan in class AbstractDbGroupScanpublic RestrictedJsonTableGroupScan getRestrictedScan(List<SchemaPath> columns)
DbGroupScangetRestrictedScan in interface DbGroupScangetRestrictedScan in class AbstractDbGroupScancolumns - 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 estimatepublic 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 DbGroupScansetRowCount in interface IndexGroupScancondition - count - capRowCount - public void setStatistics(Statistics statistics)
IndexGroupScanIndexGroupScansetStatistics in interface IndexGroupScanstatistics - which is necessary for index planningpublic double getRowCount(org.apache.calcite.rex.RexNode condition,
org.apache.calcite.rel.RelNode scanRel)
RexNode conditiongetRowCount in interface DbGroupScangetRowCount in interface IndexGroupScancondition, - filter to applypublic boolean isDistributed()
isDistributed in interface GroupScanisDistributed in class AbstractGroupScanpublic MapRDBStatistics getStatistics()
DbGroupScanDbGroupScangetStatistics in interface DbGroupScanStatistics for this Scanpublic void setColumns(List<SchemaPath> columns)
setColumns in interface IndexGroupScanpublic List<SchemaPath> getColumns()
GroupScangetColumns in interface DbGroupScangetColumns in interface GroupScangetColumns in interface IndexGroupScangetColumns in class MapRDBGroupScanpublic PartitionFunction getRangePartitionFunction(List<FieldReference> refList)
DbGroupScangetRangePartitionFunction in interface DbGroupScangetRangePartitionFunction in class AbstractDbGroupScanrefList - 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 LogicalExpressionQueryCondition condition equivalent to the given expressionpublic boolean supportsLimitPushdown()
supportsLimitPushdown in interface GroupScansupportsLimitPushdown in class AbstractGroupScanpublic GroupScan applyLimit(int maxRecords)
AbstractGroupScanapplyLimit in interface GroupScanapplyLimit in class AbstractGroupScanmaxRecords - : the number of rows requested from group scan.public int getMaxParallelizationWidth()
getMaxParallelizationWidth in interface GroupScangetMaxParallelizationWidth in class MapRDBGroupScanpublic void setParallelizationWidth(int width)
setParallelizationWidth in interface IndexGroupScanCopyright © 2021 The Apache Software Foundation. All rights reserved.