Class BinaryOperatorConversion
java.lang.Object
org.apache.druid.sql.calcite.expression.BinaryOperatorConversion
- All Implemented Interfaces:
SqlOperatorConversion
-
Constructor Summary
ConstructorsConstructorDescriptionBinaryOperatorConversion(org.apache.calcite.sql.SqlOperator operator, String druidOperator) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.calcite.sql.SqlOperatorReturns the SQL operator corresponding to this function.toDruidExpression(PlannerContext plannerContext, RowSignature rowSignature, org.apache.calcite.rex.RexNode rexNode) Translate a CalciteRexNodeto a Druid expression.toDruidExpressionWithPostAggOperands(PlannerContext plannerContext, RowSignature rowSignature, org.apache.calcite.rex.RexNode rexNode, PostAggregatorVisitor postAggregatorVisitor) Translate a CalciteRexNodeto a Druid expression, with the possibility of having postagg operands.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.druid.sql.calcite.expression.SqlOperatorConversion
toDruidFilter, toPostAggregator
-
Constructor Details
-
BinaryOperatorConversion
-
-
Method Details
-
calciteOperator
public org.apache.calcite.sql.SqlOperator calciteOperator()Description copied from interface:SqlOperatorConversionReturns the SQL operator corresponding to this function. Should be a singleton.- Specified by:
calciteOperatorin interfaceSqlOperatorConversion- Returns:
- operator
-
toDruidExpression
public DruidExpression toDruidExpression(PlannerContext plannerContext, RowSignature rowSignature, org.apache.calcite.rex.RexNode rexNode) Description copied from interface:SqlOperatorConversionTranslate a CalciteRexNodeto a Druid expression.- Specified by:
toDruidExpressionin interfaceSqlOperatorConversion- Parameters:
plannerContext- SQL planner contextrowSignature- signature of the rows to be extracted fromrexNode- expression meant to be applied on top of the rows- Returns:
- Druid expression, or null if translation is not possible
- See Also:
-
toDruidExpressionWithPostAggOperands
@Nullable public DruidExpression toDruidExpressionWithPostAggOperands(PlannerContext plannerContext, RowSignature rowSignature, org.apache.calcite.rex.RexNode rexNode, PostAggregatorVisitor postAggregatorVisitor) Description copied from interface:SqlOperatorConversionTranslate a CalciteRexNodeto a Druid expression, with the possibility of having postagg operands.- Specified by:
toDruidExpressionWithPostAggOperandsin interfaceSqlOperatorConversion- Parameters:
plannerContext- 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 as by the translation- Returns:
- Druid expression, or null if translation is not possible
- See Also:
-