Class SparkRowTuple
java.lang.Object
smile.spark.SparkRowTuple
- All Implemented Interfaces:
Serializable, Tuple
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget(int i) Returns the value at position i.<T> T[]getArray(int i) Returns the value at position i of array type.booleangetBoolean(int i) Returns the value at position i as a primitive boolean.bytegetByte(int i) Returns the value at position i as a primitive byte.getDate(int i) Returns the value at position i of date type as java.time.LocalDate.getDateTime(int i) Returns the value at position i of date type as java.time.LocalDateTime.getDecimal(int i) Returns the value at position i of decimal type as java.math.BigDecimal.doublegetDouble(int i) Returns the value at position i as a primitive double.floatgetFloat(int i) Returns the value at position i as a primitive float.intgetInt(int i) Returns the value at position i as a primitive int.longgetLong(int i) Returns the value at position i as a primitive long.shortgetShort(int i) Returns the value at position i as a primitive short.getString(int i) Returns the value at position i as a String object.getStruct(int i) Returns the value at position i of struct type.getTime(int i) Returns the value at position i of date type as java.time.LocalTime.intReturns the index of a given field name.booleanisNullAt(int i) Checks whether the value at the given position is null.intlength()Returns the number of elements in the Tuple.org.apache.spark.sql.Rowrow()Returns the underlying Spark Row.schema()Returns the schema of tuple.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Tuple
anyNull, apply, apply, get, getArray, getAs, getAs, getBoolean, getByte, getChar, getChar, getDate, getDateTime, getDecimal, getDouble, getFloat, getInt, getLong, getScale, getScale, getShort, getString, getStruct, getTime, isNullAt, toArray, toArray, toString, toString
-
Constructor Details
-
SparkRowTuple
Constructor.- Parameters:
schema- the SMILE schema.row- the Spark row.
-
-
Method Details
-
schema
Description copied from interface:TupleReturns the schema of tuple. -
length
-
indexOf
-
isNullAt
-
get
-
getBoolean
public boolean getBoolean(int i) Description copied from interface:TupleReturns the value at position i as a primitive boolean.- Specified by:
getBooleanin interfaceTuple- Parameters:
i- the index of field.- Returns:
- the field value.
-
getByte
-
getShort
-
getInt
-
getLong
-
getFloat
-
getDouble
-
getDecimal
Description copied from interface:TupleReturns the value at position i of decimal type as java.math.BigDecimal.- Specified by:
getDecimalin interfaceTuple- Parameters:
i- the index of field.- Returns:
- the field value.
-
getString
-
getDate
-
getDateTime
Description copied from interface:TupleReturns the value at position i of date type as java.time.LocalDateTime.- Specified by:
getDateTimein interfaceTuple- Parameters:
i- the index of field.- Returns:
- the field value.
-
getTime
-
getStruct
-
getArray
-
row
public org.apache.spark.sql.Row row()Returns the underlying Spark Row.- Returns:
- the Spark row.
-