Class GetArrayItem

Object
org.apache.spark.sql.internal.connector.ExpressionWithToString
org.apache.spark.sql.connector.expressions.GetArrayItem
All Implemented Interfaces:
Serializable, Expression

@Evolving public class GetArrayItem extends org.apache.spark.sql.internal.connector.ExpressionWithToString
Get array item expression.
Since:
4.1.0
See Also:
  • Constructor Details

    • GetArrayItem

      public GetArrayItem(Expression childArray, Expression ordinal, boolean failOnError)
      Creates GetArrayItem expression.
      Parameters:
      childArray - Array that is source to get element from. Child of this expression.
      ordinal - Ordinal of element. Zero-based indexing.
      failOnError - Whether expression should throw exception for index out of bound or to return null.
  • Method Details

    • childArray

      public Expression childArray()
    • ordinal

      public Expression ordinal()
    • failOnError

      public boolean failOnError()
    • children

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