public class MapRDBStatistics extends Object implements Statistics
AVG_COLUMN_SIZE, AVG_ROWSIZE_UNKNOWN, ROWCOUNT_HUGE, ROWCOUNT_UNKNOWN
Constructor and Description |
---|
MapRDBStatistics() |
Modifier and Type | Method and Description |
---|---|
String |
buildUniqueIndexIdentifier(IndexDescriptor idx)
Returns a unique index identifier
|
String |
buildUniqueIndexIdentifier(String tableName,
String idxName) |
double |
getAvgRowSize(String tabIdxName,
boolean isTableScan)
Returns the average row size for the specified filter condition
|
double |
getLeadingRowCount(org.ojai.store.QueryCondition condition,
String tabIdxName)
Returns the number of leading rows satisfying the given FILTER condition
|
double |
getLeadingRowCount(org.apache.calcite.rex.RexNode condition,
String tabIdxName,
DrillScanRelBase scanRel)
Returns the number of leading rows satisfying the given FILTER condition
|
double |
getRowCount(org.ojai.store.QueryCondition condition,
String tabIdxName)
Returns the number of rows satisfying the given FILTER condition
|
double |
getRowCount(org.apache.calcite.rex.RexNode condition,
String tabIdxName,
org.apache.calcite.rel.RelNode scanRel)
Returns the rowcount for the specified filter condition
|
double |
getRowKeyJoinBackIOFactor() |
boolean |
initialize(org.apache.calcite.rex.RexNode condition,
DrillScanRelBase scanRel,
IndexCallContext context) |
boolean |
isStatsAvailable()
Returns whether statistics are available.
|
public double getRowKeyJoinBackIOFactor()
public boolean isStatsAvailable()
Statistics
isStatsAvailable
in interface Statistics
public String buildUniqueIndexIdentifier(IndexDescriptor idx)
Statistics
buildUniqueIndexIdentifier
in interface Statistics
idx
- - Index specified as a IndexDescriptor
public String buildUniqueIndexIdentifier(String tableName, String idxName)
public double getRowCount(org.apache.calcite.rex.RexNode condition, String tabIdxName, org.apache.calcite.rel.RelNode scanRel)
Statistics
getRowCount
in interface Statistics
condition
- - Filter specified as a RexNode
tabIdxName
- - The index name generated using buildUniqueIndexIdentifier
scanRel
- - The current scan relpublic double getRowCount(org.ojai.store.QueryCondition condition, String tabIdxName)
condition
- - FILTER specified as a QueryCondition
tabIdxName
- - The table/index identifierpublic double getLeadingRowCount(org.apache.calcite.rex.RexNode condition, String tabIdxName, DrillScanRelBase scanRel)
getLeadingRowCount
in interface Statistics
condition
- - FILTER specified as a RexNode
tabIdxName
- - The table/index identifierscanRel
- - The current scanRelpublic double getLeadingRowCount(org.ojai.store.QueryCondition condition, String tabIdxName)
condition
- - FILTER specified as a QueryCondition
tabIdxName
- - The table/index identifierpublic double getAvgRowSize(String tabIdxName, boolean isTableScan)
Statistics
getAvgRowSize
in interface Statistics
tabIdxName
- - The index name generated using buildUniqueIndexIdentifier
isTableScan
- - Whether the current rel is an index scan (false for primary table)public boolean initialize(org.apache.calcite.rex.RexNode condition, DrillScanRelBase scanRel, IndexCallContext context)
initialize
in interface Statistics
Copyright © 1970 The Apache Software Foundation. All rights reserved.