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 Details

    • eval

      ValueVector eval(TupleVector input, IExecutionContext context)
      Evaluate expression against input
    • eval

      default ValueVector eval(TupleVector input, ValueVector selection, IExecutionContext context)
      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 vector
      selection - Integer vector for rows to evaluate
      context - Execution context
    • eval

      default ValueVector eval(IExecutionContext context)
      Evaluate expression. NOTE! This method should only be called on expression not needing any intput vector. Ie. from a IPredicate
    • getType

      ResolvedType getType()
      Get type of this expression
    • isConstant

      default boolean isConstant()
      Is this expression constant
    • accept

      default <T, C> T accept(IExpressionVisitor<T,C> visitor, C context)
      Accept visitor
    • fold

      default IExpression fold()
      Fold this expression. Eliminate constants etc.
    • getChildren

      default List<IExpression> 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

      default QualifiedName getQualifiedColumn()
      Return a qualified column name for this expression if any exists otherwise null
    • toVerboseString

      default String toVerboseString()
      Return a verbose string that can be used in plan printing etc. for easier debugging.
    • semanticEquals

      default boolean semanticEquals(IExpression expression)
      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"