public class DruidSqlCastConverter extends Object implements DruidSqlOperatorConverter
| Constructor and Description |
|---|
DruidSqlCastConverter() |
| Modifier and Type | Method and Description |
|---|---|
SqlOperator |
calciteOperator()
Returns the calcite SQL operator corresponding to Druid operator.
|
private static String |
castCharToDateTime(TimeZone timeZone,
String operand,
SqlTypeName toType) |
private static String |
castDateTimeToChar(TimeZone timeZone,
String operand,
SqlTypeName fromType) |
static String |
dateTimeFormatString(SqlTypeName sqlTypeName) |
String |
toDruidExpression(RexNode rexNode,
RelDataType topRel,
DruidQuery druidQuery)
Translate rexNode to valid Druid expression.
|
public SqlOperator calciteOperator()
DruidSqlOperatorConvertercalciteOperator in interface DruidSqlOperatorConverterpublic String toDruidExpression(RexNode rexNode, RelDataType topRel, DruidQuery druidQuery)
DruidSqlOperatorConvertertoDruidExpression in interface DruidSqlOperatorConverterrexNode - rexNode to translate to Druid expressiontopRel - row type associated with rexNodedruidQuery - druid query used to figure out configs/fields related like timeZoneprivate static String castCharToDateTime(TimeZone timeZone, String operand, SqlTypeName toType)
private static String castDateTimeToChar(TimeZone timeZone, String operand, SqlTypeName fromType)
public static String dateTimeFormatString(SqlTypeName sqlTypeName)
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.