Make a copy of the current Row object.
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 (or Product)
Number of elements in the Row.
Returns true if there are any NULL values in this row.
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 (or Product)
Returns the index of a given field name.
Returns the index of a given field name.
when fieldName do not exist.
UnsupportedOperationExceptionwhen schema is not defined.
Returns the value of a given fieldName.
Returns the value of a given fieldName. For primitive types if value is null it returns 'zero value' specific for primitive ie. 0 for Int - use isNullAt to ensure that value is not null
when data type does not match.
IllegalArgumentExceptionwhen fieldName do not exist.
UnsupportedOperationExceptionwhen schema is not defined.
Returns the value at position i.
Returns the value at position i. For primitive types if value is null it returns 'zero value' specific for primitive ie. 0 for Int - use isNullAt to ensure that value is not null
when data type does not match.
Returns the value at position i as a primitive boolean.
Returns the value at position i as a primitive boolean.
when data type does not match.
NullPointerExceptionwhen value is null.
Returns the value at position i as a primitive byte.
Returns the value at position i as a primitive byte.
when data type does not match.
NullPointerExceptionwhen value is null.
Returns the value at position i of date type as java.
Returns the value at position i of date type as java.sql.Date.
when data type does not match.
Returns the value at position i of decimal type as java.
Returns the value at position i of decimal type as java.math.BigDecimal.
when data type does not match.
Returns the value at position i as a primitive double.
Returns the value at position i as a primitive double.
when data type does not match.
NullPointerExceptionwhen value is null.
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.
when data type does not match.
NullPointerExceptionwhen value is null.
Returns the value at position i as a primitive int.
Returns the value at position i as a primitive int.
when data type does not match.
NullPointerExceptionwhen value is null.
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.
when data type does not match.
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.
when data type does not match.
Returns the value at position i as a primitive long.
Returns the value at position i as a primitive long.
when data type does not match.
NullPointerExceptionwhen value is null.
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.
when data type does not match.
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.
when data type does not match.
Returns the value at position i as a primitive short.
Returns the value at position i as a primitive short.
when data type does not match.
NullPointerExceptionwhen value is null.
Returns the value at position i as a String object.
Returns the value at position i as a String object.
when data type does not match.
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.
when data type does not match.
Returns the value at position i of date type as java.
Returns the value at position i of date type as java.sql.Timestamp.
when data type does not match.
Returns a Map(name -> value) for the requested fieldNames For primitive types if value is null it returns 'zero value' specific for primitive ie.
Returns a Map(name -> value) for the requested fieldNames For primitive types if value is null it returns 'zero value' specific for primitive ie. 0 for Int - use isNullAt to ensure that value is not null
when data type does not match.
IllegalArgumentExceptionwhen fieldName do not exist.
UnsupportedOperationExceptionwhen schema is not defined.
Checks whether the value at position i is null.
Displays all elements of this traversable or iterator in a string using start, end, and separator strings.
Displays all elements of this sequence in a string using a separator string.
Displays all elements of this sequence in a string (without a separator).
Schema for the row.
Number of elements in the Row.
Return a Scala Seq representing the row.
Return a Scala Seq representing the row. Elements are placed in the same order in the Seq.
Represents one row of output from a relational operator. Allows both generic access by ordinal, which will incur boxing overhead for primitives, as well as native primitive access.
It is invalid to use the native primitive interface to retrieve a value that is null, instead a user must check
isNullAt
before attempting to retrieve a value that might be null.To create a new Row, use RowFactory.create() in Java or Row.apply() in Scala.
A Row object can be constructed by providing field values. Example:
A value of a row can be accessed through both generic access by ordinal, which will incur boxing overhead for primitives, as well as native primitive access. An example of generic access by ordinal:
For native primitive access, it is invalid to use the native primitive interface to retrieve a value that is null, instead a user must check
isNullAt
before attempting to retrieve a value that might be null. An example of native primitive access:In Scala, fields in a Row object can be extracted in a pattern match. Example: