public static class HiveRewriteToDataSketchesRules.CountDistinctRewrite
extends org.apache.calcite.plan.RelOptRule
count(distinct(x)) to distinct counting sketches.
SELECT COUNT(DISTINCT id) FROM sketch_input; ⇒ SELECT ROUND(ds_hll_estimate(ds_hll_sketch(id))) FROM sketch_input;
| Constructor and Description |
|---|
CountDistinctRewrite(String sketchType) |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.hadoop.hive.ql.optimizer.calcite.rules.HiveRewriteToDataSketchesRules.CountDistinctRewrite.VBuilderPAP |
processCall(org.apache.calcite.plan.RelOptRuleCall call) |
any, convert, convert, convertList, convertOperand, convertOperand, equals, equals, getOperand, getOperands, getOutConvention, getOutTrait, hashCode, matches, none, operand, operand, operand, operand, operand, operandJ, operandJ, some, toString, unorderedpublic CountDistinctRewrite(String sketchType)
protected org.apache.hadoop.hive.ql.optimizer.calcite.rules.HiveRewriteToDataSketchesRules.CountDistinctRewrite.VBuilderPAP processCall(org.apache.calcite.plan.RelOptRuleCall call)
Copyright © 2024 The Apache Software Foundation. All rights reserved.