public class TimeExtractOperatorConversion extends Object implements SqlOperatorConversion
Constructor and Description |
---|
TimeExtractOperatorConversion() |
Modifier and Type | Method and Description |
---|---|
static DruidExpression |
applyTimeExtract(DruidExpression timeExpression,
TimestampExtractExprMacro.Unit unit,
org.joda.time.DateTimeZone timeZone) |
org.apache.calcite.sql.SqlFunction |
calciteOperator()
Returns the SQL operator corresponding to this function.
|
DruidExpression |
toDruidExpression(PlannerContext plannerContext,
RowSignature rowSignature,
org.apache.calcite.rex.RexNode rexNode)
Translate a Calcite
RexNode to a Druid expression. |
public static DruidExpression applyTimeExtract(DruidExpression timeExpression, TimestampExtractExprMacro.Unit unit, org.joda.time.DateTimeZone timeZone)
public org.apache.calcite.sql.SqlFunction calciteOperator()
SqlOperatorConversion
calciteOperator
in interface SqlOperatorConversion
public DruidExpression toDruidExpression(PlannerContext plannerContext, RowSignature rowSignature, org.apache.calcite.rex.RexNode rexNode)
SqlOperatorConversion
RexNode
to a Druid expression.toDruidExpression
in interface SqlOperatorConversion
plannerContext
- SQL planner contextrowSignature
- signature of the rows to be extracted fromrexNode
- expression meant to be applied on top of the rowsExpressions.toDruidExpression(PlannerContext, RowSignature, RexNode)
Copyright © 2011–2018. All rights reserved.