Class TimeExtractOperatorConversion
java.lang.Object
org.apache.druid.sql.calcite.expression.builtin.TimeExtractOperatorConversion
- All Implemented Interfaces:
SqlOperatorConversion
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DruidExpressionapplyTimeExtract(DruidExpression timeExpression, TimestampExtractExprMacro.Unit unit, DruidExpression timeZoneExpression) static DruidExpressionapplyTimeExtract(DruidExpression timeExpression, TimestampExtractExprMacro.Unit unit, org.joda.time.DateTimeZone timeZone) org.apache.calcite.sql.SqlFunctionReturns the SQL operator corresponding to this function.toDruidExpression(PlannerContext plannerContext, RowSignature rowSignature, org.apache.calcite.rex.RexNode rexNode) Translate a CalciteRexNodeto a Druid expression.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.druid.sql.calcite.expression.SqlOperatorConversion
toDruidExpressionWithPostAggOperands, toDruidFilter, toPostAggregator
-
Constructor Details
-
TimeExtractOperatorConversion
public TimeExtractOperatorConversion()
-
-
Method Details
-
applyTimeExtract
public static DruidExpression applyTimeExtract(DruidExpression timeExpression, TimestampExtractExprMacro.Unit unit, org.joda.time.DateTimeZone timeZone) -
applyTimeExtract
public static DruidExpression applyTimeExtract(DruidExpression timeExpression, TimestampExtractExprMacro.Unit unit, DruidExpression timeZoneExpression) -
calciteOperator
public org.apache.calcite.sql.SqlFunction calciteOperator()Description copied from interface:SqlOperatorConversionReturns the SQL operator corresponding to this function. Should be a singleton.- Specified by:
calciteOperatorin interfaceSqlOperatorConversion- Returns:
- operator
-
toDruidExpression
public DruidExpression toDruidExpression(PlannerContext plannerContext, RowSignature rowSignature, org.apache.calcite.rex.RexNode rexNode) Description copied from interface:SqlOperatorConversionTranslate a CalciteRexNodeto a Druid expression.- Specified by:
toDruidExpressionin interfaceSqlOperatorConversion- Parameters:
plannerContext- SQL planner contextrowSignature- signature of the rows to be extracted fromrexNode- expression meant to be applied on top of the rows- Returns:
- Druid expression, or null if translation is not possible
- See Also:
-