Class TimestampFloorExprMacro.TimestampFloorExpr
java.lang.Object
org.apache.druid.math.expr.ExprMacroTable.BaseMacroFunctionExpr
org.apache.druid.math.expr.ExprMacroTable.BaseScalarMacroFunctionExpr
org.apache.druid.query.expression.TimestampFloorExprMacro.TimestampFloorExpr
- All Implemented Interfaces:
Cacheable,Expr,ExprMacroTable.ExprMacroFunctionExpr
- Enclosing class:
- TimestampFloorExprMacro
public static class TimestampFloorExprMacro.TimestampFloorExpr
extends ExprMacroTable.BaseScalarMacroFunctionExpr
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.druid.math.expr.Expr
Expr.BindingAnalysis, Expr.InputBindingInspector, Expr.ObjectBinding, Expr.Shuttle, Expr.VectorInputBinding, Expr.VectorInputBindingInspector -
Field Summary
Fields inherited from class org.apache.druid.math.expr.ExprMacroTable.BaseMacroFunctionExpr
args, macroFields inherited from interface org.apache.druid.math.expr.Expr
ARG_JOINER, NULL_LITERAL -
Method Summary
Modifier and TypeMethodDescription<T> ExprVectorProcessor<T>Builds a 'vectorized' expression processor, that can operate on batches of input values for use in vectorized query engines.booleancanVectorize(Expr.InputBindingInspector inspector) Check if an expression can be 'vectorized', for a given set of inputs.booleaneval(Expr.ObjectBinding bindings) getArg()Exposed for Druid SQL: this is used by Expressions.toQueryGranularity.Exposed for Druid SQL: this is used by Expressions.toQueryGranularity.getOutputType(Expr.InputBindingInspector inspector) Given anExpr.InputBindingInspector, compute what the outputExpressionTypewill be for this expression.inthashCode()Methods inherited from class org.apache.druid.math.expr.ExprMacroTable.BaseScalarMacroFunctionExpr
supplyAnalyzeInputsMethods inherited from class org.apache.druid.math.expr.ExprMacroTable.BaseMacroFunctionExpr
analyzeInputs, getArgs, stringify, toString, visitMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.druid.math.expr.Expr
asBitmapColumnIndex, asColumnIndexSupplier, asSingleThreaded, decorateCacheKeyBuilder, getBindingIfIdentifier, getCacheKey, getIdentifierExprIfIdentifierExpr, getIdentifierIfIdentifier, getLiteralValue, isIdentifier, isLiteral, isNullLiteral, rewriteBindings
-
Method Details
-
getArg
Exposed for Druid SQL: this is used by Expressions.toQueryGranularity. -
getGranularity
Exposed for Druid SQL: this is used by Expressions.toQueryGranularity. -
eval
Description copied from interface:Expr -
getOutputType
Description copied from interface:ExprGiven anExpr.InputBindingInspector, compute what the outputExpressionTypewill be for this expression. In the vectorized expression engine, ifExpr.canVectorize(InputBindingInspector)returns true, a return value of null MUST ONLY indicate that the expression has all null inputs (non-existent columns) or null constants for the entire expression. Otherwise, all vectorizable expressions must produce an output type to correctly operate with the vectorized engine. Outside the context of vectorized expressions, a return value of null can also indicate that the given type information was not enough to resolve the output type, so the expression must be evaluated using defaultExpr.eval(org.apache.druid.math.expr.Expr.ObjectBinding)handling where types are only known after evaluation, throughExprEval.type(), such as transform expressions at ingestion time -
canVectorize
Description copied from interface:ExprCheck if an expression can be 'vectorized', for a given set of inputs. If this method returns true,Expr.asVectorProcessor(org.apache.druid.math.expr.Expr.VectorInputBindingInspector)is expected to produce aExprVectorProcessorwhich can evaluate values in batches to use with vectorized query engines.Note that this method is insufficient by itself for determining to use vector processors, as it only checks whether the expression tree itself supports vectorization, but ignores schema-level constraints that
ExpressionPlannerenforces.Most callers should instead prefer to use
ExpressionPlanner.plan(ColumnInspector, Expr)and check forExpressionPlan.Trait.VECTORIZABLEon the resulting plan.- Specified by:
canVectorizein interfaceExpr- Overrides:
canVectorizein classExprMacroTable.BaseMacroFunctionExpr
-
asVectorProcessor
Description copied from interface:ExprBuilds a 'vectorized' expression processor, that can operate on batches of input values for use in vectorized query engines.- Specified by:
asVectorProcessorin interfaceExpr- Overrides:
asVectorProcessorin classExprMacroTable.BaseMacroFunctionExpr
-
equals
- Overrides:
equalsin classExprMacroTable.BaseMacroFunctionExpr
-
hashCode
public int hashCode()- Overrides:
hashCodein classExprMacroTable.BaseMacroFunctionExpr
-