| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
FilterSelectivityEstimator(org.apache.calcite.rel.RelNode childRel,
org.apache.calcite.rel.metadata.RelMetadataQuery mq) |
| Modifier and Type | Method and Description |
|---|---|
static double |
betweenSelectivity(org.apache.datasketches.kll.KllFloatsSketch kll,
float leftValue,
float rightValue)
Returns the selectivity of a predicate "column BETWEEN leftValue AND rightValue" in the range [0, 1]
|
Double |
estimateSelectivity(org.apache.calcite.rex.RexNode predicate) |
static double |
greaterThanOrEqualSelectivity(org.apache.datasketches.kll.KllFloatsSketch kll,
float value)
Returns the selectivity of a predicate "column >= value" in the range [0, 1]
|
static double |
greaterThanSelectivity(org.apache.datasketches.kll.KllFloatsSketch kll,
float value)
Returns the selectivity of a predicate "column > value" in the range [0, 1]
|
static boolean |
isHistogramAvailable(ColStatistics colStats)
Returns true if histogram statistics are available in the column statistics information, false otherwise.
|
static double |
lessThanOrEqualSelectivity(org.apache.datasketches.kll.KllFloatsSketch kll,
float value)
Returns the selectivity of a predicate "column <= value" in the range [0, 1]
|
static double |
lessThanSelectivity(org.apache.datasketches.kll.KllFloatsSketch kll,
float value)
Returns the selectivity of a predicate "column < value" in the range [0, 1]
|
Double |
visitCall(org.apache.calcite.rex.RexCall call) |
Double |
visitInputRef(org.apache.calcite.rex.RexInputRef inputRef) |
Double |
visitLiteral(org.apache.calcite.rex.RexLiteral literal) |
visitArrayAnd, visitArrayOr, visitCorrelVariable, visitDynamicParam, visitFieldAccess, visitLocalRef, visitOver, visitPatternFieldRef, visitRangeRef, visitSubQuery, visitTableInputRefpublic FilterSelectivityEstimator(org.apache.calcite.rel.RelNode childRel,
org.apache.calcite.rel.metadata.RelMetadataQuery mq)
public Double estimateSelectivity(org.apache.calcite.rex.RexNode predicate)
public Double visitInputRef(org.apache.calcite.rex.RexInputRef inputRef)
public Double visitCall(org.apache.calcite.rex.RexCall call)
public Double visitLiteral(org.apache.calcite.rex.RexLiteral literal)
public static double greaterThanSelectivity(org.apache.datasketches.kll.KllFloatsSketch kll,
float value)
kll - the KLL sketch for the involved columnvalue - the literal used in the comparisonpublic static double greaterThanOrEqualSelectivity(org.apache.datasketches.kll.KllFloatsSketch kll,
float value)
kll - the KLL sketch for the involved columnvalue - the literal used in the comparisonpublic static double lessThanOrEqualSelectivity(org.apache.datasketches.kll.KllFloatsSketch kll,
float value)
kll - the KLL sketch for the involved columnvalue - the literal used in the comparisonpublic static double lessThanSelectivity(org.apache.datasketches.kll.KllFloatsSketch kll,
float value)
kll - the KLL sketch for the involved columnvalue - the literal used in the comparisonpublic static double betweenSelectivity(org.apache.datasketches.kll.KllFloatsSketch kll,
float leftValue,
float rightValue)
kll - the KLL sketch for the involved columnleftValue - the LHS literal in the BETWEEN statementrightValue - the RHS literal in the BETWEEN statementIllegalArgumentException - if leftValue is equal to rightValuepublic static boolean isHistogramAvailable(ColStatistics colStats)
colStats - the input column statistics informationCopyright © 2024 The Apache Software Foundation. All rights reserved.