public class ExtractOperatorConversion extends Object implements DruidSqlOperatorConverter
| Modifier and Type | Field and Description |
|---|---|
private static Map<org.apache.calcite.avatica.util.TimeUnitRange,String> |
EXTRACT_UNIT_MAP |
| Constructor and Description |
|---|
ExtractOperatorConversion() |
| Modifier and Type | Method and Description |
|---|---|
SqlOperator |
calciteOperator()
Returns the calcite SQL operator corresponding to Druid operator.
|
String |
toDruidExpression(RexNode rexNode,
RelDataType rowType,
DruidQuery query)
Translate rexNode to valid Druid expression.
|
private static final Map<org.apache.calcite.avatica.util.TimeUnitRange,String> EXTRACT_UNIT_MAP
public SqlOperator calciteOperator()
DruidSqlOperatorConvertercalciteOperator in interface DruidSqlOperatorConverterpublic String toDruidExpression(RexNode rexNode, RelDataType rowType, DruidQuery query)
DruidSqlOperatorConvertertoDruidExpression in interface DruidSqlOperatorConverterrexNode - rexNode to translate to Druid expressionrowType - row type associated with rexNodequery - druid query used to figure out configs/fields related like timeZoneCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.