Interface Expression

All Known Subinterfaces:
AggregateFunc, Literal<T>, NamedReference, RewritableTransform, SortOrder, Transform
All Known Implementing Classes:
AlwaysFalse, AlwaysTrue, And, Avg, Cast, Count, CountStar, org.apache.spark.sql.internal.connector.ExpressionWithToString, Extract, GeneralAggregateFunc, GeneralScalarExpression, Max, Min, Not, Or, Predicate, Sum, UserDefinedAggregateFunc, UserDefinedScalarFunc

@Evolving public interface Expression
Base class of the public logical expression API.
Since:
3.0.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Expression[]
     
    static final NamedReference[]
    `EMPTY_EXPRESSION` is only used as an input when the default `references` method builds the result array to avoid repeatedly allocating an empty array.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns an array of the children of this node.
    default String
    Format the expression as a human readable SQL-like string.
    default NamedReference[]
    List of fields or columns that are referenced by this expression.
  • Field Details

    • EMPTY_EXPRESSION

      static final Expression[] EMPTY_EXPRESSION
    • EMPTY_NAMED_REFERENCE

      static final NamedReference[] EMPTY_NAMED_REFERENCE
      `EMPTY_EXPRESSION` is only used as an input when the default `references` method builds the result array to avoid repeatedly allocating an empty array.
  • Method Details

    • describe

      default String describe()
      Format the expression as a human readable SQL-like string.
    • children

      Expression[] children()
      Returns an array of the children of this node. Children should not change.
    • references

      default NamedReference[] references()
      List of fields or columns that are referenced by this expression.