public class Aggregations extends Object
| Modifier and Type | Method and Description |
|---|---|
static List<DruidExpression> |
getArgumentsForSimpleAggregator(PlannerContext plannerContext,
RowSignature rowSignature,
org.apache.calcite.rel.core.AggregateCall call,
org.apache.calcite.rel.core.Project project)
Get Druid expressions that correspond to "simple" aggregator inputs.
|
static DruidExpression |
toDruidExpressionForNumericAggregator(PlannerContext plannerContext,
RowSignature rowSignature,
org.apache.calcite.rex.RexNode rexNode)
Translate a Calcite
RexNode to a Druid expression for the aggregators that require numeric type inputs. |
@Nullable public static List<DruidExpression> getArgumentsForSimpleAggregator(PlannerContext plannerContext, RowSignature rowSignature, org.apache.calcite.rel.core.AggregateCall call, @Nullable org.apache.calcite.rel.core.Project project)
plannerContext - SQL planner contextrowSignature - input row signaturecall - aggregate call objectproject - project that should be applied before aggregation; may be nullpublic static DruidExpression toDruidExpressionForNumericAggregator(PlannerContext plannerContext, RowSignature rowSignature, org.apache.calcite.rex.RexNode rexNode)
RexNode to a Druid expression for the aggregators that require numeric type inputs.
The returned expression can keep an explicit cast from strings to numbers when the column consumed by
the expression is the string type.
Consider using Expressions.toDruidExpression(PlannerContext, RowSignature, RexNode) for projections
or the aggregators that don't require numeric inputs.plannerContext - SQL planner contextrowSignature - signature of the rows to be extracted fromrexNode - expression meant to be applied on top of the rowsCopyright © 2011–2022 The Apache Software Foundation. All rights reserved.