Interface IExpression
- All Known Subinterfaces:
IArithmeticBinaryExpression,IArithmeticUnaryExpression,IAtTimeZoneExpression,IBinaryExpression,ICaseExpression,ICastExpression,IColumnExpression,IComparisonExpression,IDateAddExpression,IDateDiffExpression,IDatePartExpression,IDereferenceExpression,IFunctionCallExpression,IInExpression,ILambdaExpression,ILikeExpression,ILiteralArrayExpression,ILiteralBooleanExpression,ILiteralDateTimeExpression,ILiteralDateTimeOffsetExpression,ILiteralDecimalExpression,ILiteralDoubleExpression,ILiteralExpression,ILiteralFloatExpression,ILiteralIntegerExpression,ILiteralLongExpression,ILiteralNullExpression,ILiteralObjectExpression,ILiteralStringExpression,ILogicalBinaryExpression,ILogicalNotExpression,INamedExpression,INestedExpression,INullPredicateExpression,ISubscriptExpression,ITemplateStringExpression,IUnaryExpression,IVariableExpression
public interface IExpression
Definition of an expression
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T,C> T accept(IExpressionVisitor<T, C> visitor, C context) Accept visitordefault ValueVectoreval(IExecutionContext context) Evaluate expression.eval(TupleVector input, IExecutionContext context) Evaluate expression against inputdefault ValueVectoreval(TupleVector input, ValueVector selection, IExecutionContext context) Evaluate this expression against input with a row selection.default IExpressionfold()Fold this expression.default List<IExpression>Get child expressions if anydefault QualifiedNameReturn a qualified column name for this expression if any exists otherwise nullgetType()Get type of this expressiondefault booleanIs this expression constantdefault booleanReturns true if this expression is internal and used between plans etc.default booleansemanticEquals(IExpression expression) Returns true if this expression is semantic equal to provided expression.default StringReturn a verbose string that can be used in plan printing etc.
-
Method Details
-
eval
Evaluate expression against input -
eval
Evaluate this expression against input with a row selection. NOTE! This method should be overriden by expressions to avoid creating a filter vector. This is only for backwards compatibility and should be made non default.- Parameters:
input- Input vectorselection- Integer vector for rows to evaluatecontext- Execution context
-
eval
Evaluate expression. NOTE! This method should only be called on expression not needing any intput vector. Ie. from aIPredicate -
getType
ResolvedType getType()Get type of this expression -
isConstant
default boolean isConstant()Is this expression constant -
accept
Accept visitor -
fold
Fold this expression. Eliminate constants etc. -
getChildren
Get child expressions if any -
isInternal
default boolean isInternal()Returns true if this expression is internal and used between plans etc. and should not be written to output -
getQualifiedColumn
Return a qualified column name for this expression if any exists otherwise null -
toVerboseString
Return a verbose string that can be used in plan printing etc. for easier debugging. -
semanticEquals
Returns true if this expression is semantic equal to provided expression. That is the meaning is equal but not necessary object equality equal. ie. "col1 + col2" = "col2 + col2"
-