Package org.apache.calcite.adapter.druid
Class DruidSqlCastConverter
java.lang.Object
org.apache.calcite.adapter.druid.DruidSqlCastConverter
- All Implemented Interfaces:
DruidSqlOperatorConverter
Druid cast converter operator; used to translates Calcite casts to Druid
expression casts.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the calcite SQL operator corresponding to Druid operator.static @Nullable String
dateTimeFormatString
(SqlTypeName sqlTypeName) @Nullable String
toDruidExpression
(RexNode rexNode, RelDataType topRel, DruidQuery druidQuery) Translate rexNode to valid Druid expression.
-
Constructor Details
-
DruidSqlCastConverter
public DruidSqlCastConverter()
-
-
Method Details
-
calciteOperator
Description copied from interface:DruidSqlOperatorConverter
Returns the calcite SQL operator corresponding to Druid operator.- Specified by:
calciteOperator
in interfaceDruidSqlOperatorConverter
- Returns:
- operator
-
toDruidExpression
public @Nullable String toDruidExpression(RexNode rexNode, RelDataType topRel, DruidQuery druidQuery) Description copied from interface:DruidSqlOperatorConverter
Translate rexNode to valid Druid expression.- Specified by:
toDruidExpression
in interfaceDruidSqlOperatorConverter
- Parameters:
rexNode
- rexNode to translate to Druid expressiontopRel
- row type associated with rexNodedruidQuery
- druid query used to figure out configs/fields related like timeZone- Returns:
- valid Druid expression or null if it can not convert the rexNode
-
dateTimeFormatString
-