Package org.apache.druid.segment.virtual
Class ExpressionPlan
java.lang.Object
org.apache.druid.segment.virtual.ExpressionPlan
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanany(ExpressionPlan.Trait... flags) Returns true if any of the supplied traits are true in this planReturns basic analysis of the inputs to anExprand how they are usedIf an expression uses a multi-valued input in a scalar manner, the expression can be automatically transformed to map these values across the expression, applying the original expression to every value.getAppliedFoldExpression(String accumulatorId) If an expression uses a multi-valued input in a scalar manner, and the expression contains an accumulator such as for use as part of an aggregator, the expression can be automatically transformed to fold the accumulator across the values of the original expression.Gets the original expression that was plannedThe output type of the original expression.If and only if the expression has a single input, get the name of that inputIf and only if the column has a single input, get theValueTypeof that inputGet set of inputs which were completely missing information, possibly a non-existent column or from a column selector factory with incomplete informationinferColumnCapabilities(ColumnType outputTypeHint) Tries to construct the most appropriateColumnCapabilitiesfor this plan given theoutputTypeandtraitsinferred by theExpressionPlanner, optionally with the help of hintValueType.booleanis(ExpressionPlan.Trait... flags) Returns true if all of the supplied traits are true in this planbooleanAn expression with no inputs is a constant
-
Method Details
-
isConstant
public boolean isConstant()An expression with no inputs is a constant -
getExpression
Gets the original expression that was planned -
getAppliedExpression
If an expression uses a multi-valued input in a scalar manner, the expression can be automatically transformed to map these values across the expression, applying the original expression to every value.- See Also:
-
getAppliedFoldExpression
If an expression uses a multi-valued input in a scalar manner, and the expression contains an accumulator such as for use as part of an aggregator, the expression can be automatically transformed to fold the accumulator across the values of the original expression.- See Also:
-
getOutputType
The output type of the original expression. Note that this might not be the true for the expressions provided bygetAppliedExpression()orgetAppliedFoldExpression(String), should the expression have any unapplied inputs -
getSingleInputType
If and only if the column has a single input, get theValueTypeof that input -
getSingleInputName
If and only if the expression has a single input, get the name of that input -
getUnknownInputs
Get set of inputs which were completely missing information, possibly a non-existent column or from a column selector factory with incomplete information -
getAnalysis
Returns basic analysis of the inputs to anExprand how they are used- See Also:
-
inferColumnCapabilities
Tries to construct the most appropriateColumnCapabilitiesfor this plan given theoutputTypeandtraitsinferred by theExpressionPlanner, optionally with the help of hintValueType. If no output type was able to be inferred during planning, returns null -
is
Returns true if all of the supplied traits are true in this plan -
any
Returns true if any of the supplied traits are true in this plan
-