Interface Literal<T>

Type Parameters:
T - the JVM type of a value held by the literal
All Superinterfaces:
Expression
All Known Implementing Classes:
AlwaysFalse, AlwaysTrue

@Evolving public interface Literal<T> extends Expression
Represents a constant literal value in the public expression API.

The JVM type of the value held by a literal must be the type used by Spark's InternalRow API for the literal's SQL data type.

Since:
3.0.0
  • Method Details

    • value

      T value()
      Returns the literal value.
    • dataType

      DataType dataType()
      Returns the SQL data type of the literal.
    • children

      default Expression[] children()
      Description copied from interface: Expression
      Returns an array of the children of this node. Children should not change.
      Specified by:
      children in interface Expression