Package org.apache.calcite.adapter.druid
Class SubstringOperatorConversion
- java.lang.Object
-
- org.apache.calcite.adapter.druid.SubstringOperatorConversion
-
- All Implemented Interfaces:
DruidSqlOperatorConverter
public class SubstringOperatorConversion extends java.lang.Object implements DruidSqlOperatorConverter
Converts Calcite SUBSTRING call to Druid Expression when possible
-
-
Constructor Summary
Constructors Constructor Description SubstringOperatorConversion()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SqlOperator
calciteOperator()
Returns the calcite SQL operator corresponding to Druid operator.java.lang.String
toDruidExpression(RexNode rexNode, RelDataType rowType, DruidQuery query)
Translate rexNode to valid Druid expression.
-
-
-
Method Detail
-
calciteOperator
public SqlOperator calciteOperator()
Description copied from interface:DruidSqlOperatorConverter
Returns the calcite SQL operator corresponding to Druid operator.- Specified by:
calciteOperator
in interfaceDruidSqlOperatorConverter
- Returns:
- operator
-
toDruidExpression
@Nullable public java.lang.String toDruidExpression(RexNode rexNode, RelDataType rowType, DruidQuery query)
Description copied from interface:DruidSqlOperatorConverter
Translate rexNode to valid Druid expression.- Specified by:
toDruidExpression
in interfaceDruidSqlOperatorConverter
- Parameters:
rexNode
- rexNode to translate to Druid expressionrowType
- row type associated with rexNodequery
- druid query used to figure out configs/fields related like timeZone- Returns:
- valid Druid expression or null if it can not convert the rexNode
-
-