public class OperatorConversions extends Object
SqlOperatorConversion implementations.| Modifier and Type | Class and Description |
|---|---|
static class |
OperatorConversions.OperatorBuilder |
| Constructor and Description |
|---|
OperatorConversions() |
| Modifier and Type | Method and Description |
|---|---|
static DruidExpression |
convertCall(PlannerContext plannerContext,
RowSignature rowSignature,
org.apache.calcite.rex.RexNode rexNode,
DruidExpression.DruidExpressionCreator expressionFunction) |
static DruidExpression |
convertCall(PlannerContext plannerContext,
RowSignature rowSignature,
org.apache.calcite.rex.RexNode rexNode,
String functionName)
Deprecated.
|
static DruidExpression |
convertCall(PlannerContext plannerContext,
RowSignature rowSignature,
org.apache.calcite.rex.RexNode rexNode,
String functionName,
Function<List<DruidExpression>,SimpleExtraction> simpleExtractionFunction)
Deprecated.
|
static DruidExpression |
convertCallBuilder(PlannerContext plannerContext,
RowSignature rowSignature,
org.apache.calcite.rex.RexNode rexNode,
DruidExpression.ExpressionGenerator expressionGenerator) |
static DruidExpression |
convertCallWithPostAggOperands(PlannerContext plannerContext,
RowSignature rowSignature,
org.apache.calcite.rex.RexNode rexNode,
DruidExpression.DruidExpressionCreator expressionFunction,
PostAggregatorVisitor postAggregatorVisitor) |
static DruidExpression |
convertDirectCall(PlannerContext plannerContext,
RowSignature rowSignature,
org.apache.calcite.rex.RexNode rexNode,
String functionName) |
static DruidExpression |
convertDirectCallWithExtraction(PlannerContext plannerContext,
RowSignature rowSignature,
org.apache.calcite.rex.RexNode rexNode,
String functionName,
Function<List<DruidExpression>,SimpleExtraction> simpleExtractionFunction) |
static DirectOperatorConversion |
druidBinaryLongFn(String sqlOperator,
String druidFunctionName) |
static DirectOperatorConversion |
druidUnaryDoubleFn(String sqlOperator,
String druidFunctionName) |
static DirectOperatorConversion |
druidUnaryLongFn(String sqlOperator,
String druidFunctionName) |
static <T> T |
getOperandWithDefault(List<org.apache.calcite.rex.RexNode> operands,
int i,
Function<org.apache.calcite.rex.RexNode,T> f,
T defaultReturnValue)
Gets operand "i" from "operands", or returns a default value if it doesn't exist (operands is too short)
or is null.
|
static OperatorConversions.OperatorBuilder |
operatorBuilder(String name)
Returns a builder that helps
SqlOperatorConversion implementations create the SqlFunction
objects they need to return from SqlOperatorConversion.calciteOperator(). |
static PostAggregator |
toPostAggregator(PlannerContext plannerContext,
RowSignature rowSignature,
org.apache.calcite.rex.RexNode rexNode,
PostAggregatorVisitor postAggregatorVisitor)
Translate a Calcite
RexNode to a Druid PostAggregator |
@Nullable public static DruidExpression convertDirectCall(PlannerContext plannerContext, RowSignature rowSignature, org.apache.calcite.rex.RexNode rexNode, String functionName)
@Nullable public static DruidExpression convertDirectCallWithExtraction(PlannerContext plannerContext, RowSignature rowSignature, org.apache.calcite.rex.RexNode rexNode, String functionName, Function<List<DruidExpression>,SimpleExtraction> simpleExtractionFunction)
@Nullable public static DruidExpression convertCallBuilder(PlannerContext plannerContext, RowSignature rowSignature, org.apache.calcite.rex.RexNode rexNode, DruidExpression.ExpressionGenerator expressionGenerator)
@Nullable public static DruidExpression convertCall(PlannerContext plannerContext, RowSignature rowSignature, org.apache.calcite.rex.RexNode rexNode, DruidExpression.DruidExpressionCreator expressionFunction)
@Deprecated @Nullable public static DruidExpression convertCall(PlannerContext plannerContext, RowSignature rowSignature, org.apache.calcite.rex.RexNode rexNode, String functionName)
@Deprecated @Nullable public static DruidExpression convertCall(PlannerContext plannerContext, RowSignature rowSignature, org.apache.calcite.rex.RexNode rexNode, String functionName, Function<List<DruidExpression>,SimpleExtraction> simpleExtractionFunction)
public static <T> T getOperandWithDefault(List<org.apache.calcite.rex.RexNode> operands, int i, Function<org.apache.calcite.rex.RexNode,T> f, T defaultReturnValue)
@Nullable public static DruidExpression convertCallWithPostAggOperands(PlannerContext plannerContext, RowSignature rowSignature, org.apache.calcite.rex.RexNode rexNode, DruidExpression.DruidExpressionCreator expressionFunction, PostAggregatorVisitor postAggregatorVisitor)
@Nullable public static PostAggregator toPostAggregator(PlannerContext plannerContext, RowSignature rowSignature, org.apache.calcite.rex.RexNode rexNode, PostAggregatorVisitor postAggregatorVisitor)
RexNode to a Druid PostAggregatorplannerContext - SQL planner contextrowSignature - signature of the rows to be extracted fromrexNode - expression meant to be applied on top of the rowspostAggregatorVisitor - visitor that manages postagg names and tracks postaggs that were created
by the translationpublic static OperatorConversions.OperatorBuilder operatorBuilder(String name)
SqlOperatorConversion implementations create the SqlFunction
objects they need to return from SqlOperatorConversion.calciteOperator().public static DirectOperatorConversion druidUnaryLongFn(String sqlOperator, String druidFunctionName)
public static DirectOperatorConversion druidBinaryLongFn(String sqlOperator, String druidFunctionName)
public static DirectOperatorConversion druidUnaryDoubleFn(String sqlOperator, String druidFunctionName)
Copyright © 2011–2022 The Apache Software Foundation. All rights reserved.