org.apache.spark.sql.catalyst.expressions

MutableRow

Related Doc: package expressions

trait MutableRow extends Row

An extended interface to Row that allows the values for each column to be updated. Setting a value through a primitive function implicitly marks that column as not null.

Linear Supertypes
sql.Row, Serializable, Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MutableRow
  2. Row
  3. Serializable
  4. Serializable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def apply(i: Int): Any

    Returns the value at position i.

    Returns the value at position i. If the value is null, null is returned. The following is a mapping between Spark SQL types and return types:

    BooleanType -> java.lang.Boolean
    ByteType -> java.lang.Byte
    ShortType -> java.lang.Short
    IntegerType -> java.lang.Integer
    FloatType -> java.lang.Float
    DoubleType -> java.lang.Double
    StringType -> String
    DecimalType -> java.math.BigDecimal
    
    DateType -> java.sql.Date
    TimestampType -> java.sql.Timestamp
    
    BinaryType -> byte array
    ArrayType -> scala.collection.Seq (use getList for java.util.List)
    MapType -> scala.collection.Map (use getJavaMap for java.util.Map)
    StructType -> org.apache.spark.sql.Row
    Definition Classes
    Row
  2. abstract def copy(): sql.Row

    Make a copy of the current Row object.

    Make a copy of the current Row object.

    Definition Classes
    Row
  3. abstract def getBoolean(i: Int): Boolean

    Returns the value at position i as a primitive boolean.

    Returns the value at position i as a primitive boolean.

    Definition Classes
    Row
    Exceptions thrown

    ClassCastException when data type does not match.

    NullPointerException when value is null.

  4. abstract def getByte(i: Int): Byte

    Returns the value at position i as a primitive byte.

    Returns the value at position i as a primitive byte.

    Definition Classes
    Row
    Exceptions thrown

    ClassCastException when data type does not match.

    NullPointerException when value is null.

  5. abstract def getDouble(i: Int): Double

    Returns the value at position i as a primitive double.

    Returns the value at position i as a primitive double.

    Definition Classes
    Row
    Exceptions thrown

    ClassCastException when data type does not match.

    NullPointerException when value is null.

  6. abstract def getFloat(i: Int): Float

    Returns the value at position i as a primitive float.

    Returns the value at position i as a primitive float. Throws an exception if the type mismatches or if the value is null.

    Definition Classes
    Row
    Exceptions thrown

    ClassCastException when data type does not match.

    NullPointerException when value is null.

  7. abstract def getInt(i: Int): Int

    Returns the value at position i as a primitive int.

    Returns the value at position i as a primitive int.

    Definition Classes
    Row
    Exceptions thrown

    ClassCastException when data type does not match.

    NullPointerException when value is null.

  8. abstract def getLong(i: Int): Long

    Returns the value at position i as a primitive long.

    Returns the value at position i as a primitive long.

    Definition Classes
    Row
    Exceptions thrown

    ClassCastException when data type does not match.

    NullPointerException when value is null.

  9. abstract def getShort(i: Int): Short

    Returns the value at position i as a primitive short.

    Returns the value at position i as a primitive short.

    Definition Classes
    Row
    Exceptions thrown

    ClassCastException when data type does not match.

    NullPointerException when value is null.

  10. abstract def getString(i: Int): String

    Returns the value at position i as a String object.

    Returns the value at position i as a String object.

    Definition Classes
    Row
    Exceptions thrown

    ClassCastException when data type does not match.

    NullPointerException when value is null.

  11. abstract def isNullAt(i: Int): Boolean

    Checks whether the value at position i is null.

    Checks whether the value at position i is null.

    Definition Classes
    Row
  12. abstract def length: Int

    Number of elements in the Row.

    Number of elements in the Row.

    Definition Classes
    Row
  13. abstract def setBoolean(ordinal: Int, value: Boolean): Unit

  14. abstract def setByte(ordinal: Int, value: Byte): Unit

  15. abstract def setDouble(ordinal: Int, value: Double): Unit

  16. abstract def setFloat(ordinal: Int, value: Float): Unit

  17. abstract def setInt(ordinal: Int, value: Int): Unit

  18. abstract def setLong(ordinal: Int, value: Long): Unit

  19. abstract def setNullAt(i: Int): Unit

  20. abstract def setShort(ordinal: Int, value: Short): Unit

  21. abstract def setString(ordinal: Int, value: String): Unit

  22. abstract def toSeq: Seq[Any]

    Return a Scala Seq representing the row.

    Return a Scala Seq representing the row. ELements are placed in the same order in the Seq.

    Definition Classes
    Row
  23. abstract def update(ordinal: Int, value: Any): Unit

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. def anyNull: Boolean

    Returns true if there are any NULL values in this row.

    Returns true if there are any NULL values in this row.

    Definition Classes
    Row
  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  8. def equals(that: Any): Boolean

    Definition Classes
    Row → AnyRef → Any
  9. def fieldIndex(name: String): Int

    Returns the index of a given field name.

    Returns the index of a given field name.

    Definition Classes
    Row
    Exceptions thrown

    IllegalArgumentException when fieldName do not exist.

    UnsupportedOperationException when schema is not defined.

  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def get(i: Int): Any

    Returns the value at position i.

    Returns the value at position i. If the value is null, null is returned. The following is a mapping between Spark SQL types and return types:

    BooleanType -> java.lang.Boolean
    ByteType -> java.lang.Byte
    ShortType -> java.lang.Short
    IntegerType -> java.lang.Integer
    FloatType -> java.lang.Float
    DoubleType -> java.lang.Double
    StringType -> String
    DecimalType -> java.math.BigDecimal
    
    DateType -> java.sql.Date
    TimestampType -> java.sql.Timestamp
    
    BinaryType -> byte array
    ArrayType -> scala.collection.Seq (use getList for java.util.List)
    MapType -> scala.collection.Map (use getJavaMap for java.util.Map)
    StructType -> org.apache.spark.sql.Row
    Definition Classes
    Row
  12. def getAs[T](fieldName: String): T

    Returns the value of a given fieldName.

    Returns the value of a given fieldName.

    Definition Classes
    Row
    Exceptions thrown

    ClassCastException when data type does not match.

    IllegalArgumentException when fieldName do not exist.

    UnsupportedOperationException when schema is not defined.

  13. def getAs[T](i: Int): T

    Returns the value at position i.

    Returns the value at position i.

    Definition Classes
    Row
    Exceptions thrown

    ClassCastException when data type does not match.

  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def getDate(i: Int): Date

    Returns the value at position i of date type as java.sql.Date.

    Returns the value at position i of date type as java.sql.Date.

    Definition Classes
    Row
    Exceptions thrown

    ClassCastException when data type does not match.

  16. def getDecimal(i: Int): BigDecimal

    Returns the value at position i of decimal type as java.math.BigDecimal.

    Returns the value at position i of decimal type as java.math.BigDecimal.

    Definition Classes
    Row
    Exceptions thrown

    ClassCastException when data type does not match.

  17. def getJavaMap[K, V](i: Int): Map[K, V]

    Returns the value at position i of array type as a java.util.Map.

    Returns the value at position i of array type as a java.util.Map.

    Definition Classes
    Row
    Exceptions thrown

    ClassCastException when data type does not match.

  18. def getList[T](i: Int): List[T]

    Returns the value at position i of array type as java.util.List.

    Returns the value at position i of array type as java.util.List.

    Definition Classes
    Row
    Exceptions thrown

    ClassCastException when data type does not match.

  19. def getMap[K, V](i: Int): Map[K, V]

    Returns the value at position i of map type as a Scala Map.

    Returns the value at position i of map type as a Scala Map.

    Definition Classes
    Row
    Exceptions thrown

    ClassCastException when data type does not match.

  20. def getSeq[T](i: Int): Seq[T]

    Returns the value at position i of array type as a Scala Seq.

    Returns the value at position i of array type as a Scala Seq.

    Definition Classes
    Row
    Exceptions thrown

    ClassCastException when data type does not match.

  21. def getStruct(i: Int): sql.Row

    Returns the value at position i of struct type as an Row object.

    Returns the value at position i of struct type as an Row object.

    Definition Classes
    Row
    Exceptions thrown

    ClassCastException when data type does not match.

  22. def getValuesMap[T](fieldNames: Seq[String]): Map[String, T]

    Returns a Map(name -> value) for the requested fieldNames

    Returns a Map(name -> value) for the requested fieldNames

    Definition Classes
    Row
    Exceptions thrown

    ClassCastException when data type does not match.

    IllegalArgumentException when fieldName do not exist.

    UnsupportedOperationException when schema is not defined.

  23. def hashCode(): Int

    Definition Classes
    Row → AnyRef → Any
  24. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  25. def mkString(start: String, sep: String, end: String): String

    Displays all elements of this traversable or iterator in a string using start, end, and separator strings.

    Displays all elements of this traversable or iterator in a string using start, end, and separator strings.

    Definition Classes
    Row
  26. def mkString(sep: String): String

    Displays all elements of this sequence in a string using a separator string.

    Displays all elements of this sequence in a string using a separator string.

    Definition Classes
    Row
  27. def mkString: String

    Displays all elements of this sequence in a string (without a separator).

    Displays all elements of this sequence in a string (without a separator).

    Definition Classes
    Row
  28. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  29. final def notify(): Unit

    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  31. def schema: StructType

    Schema for the row.

    Schema for the row.

    Definition Classes
    Row
  32. def size: Int

    Number of elements in the Row.

    Number of elements in the Row.

    Definition Classes
    Row
  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  34. def toString(): String

    Definition Classes
    Row → AnyRef → Any
  35. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from sql.Row

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped