Package com.snowflake.snowpark_java
Class Row
- java.lang.Object
-
- com.snowflake.snowpark_java.Row
-
- All Implemented Interfaces:
Serializable,Cloneable
public class Row extends Object implements Serializable, Cloneable
Represents a row returned by the evaluation of aDataFrame.- Since:
- 0.9.0
- See Also:
DataFram, Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Rowclone()Creates a clone of thisRowobject.static Rowcreate(Object... values)Creates aRowbased on the given values.booleanequals(Object other)Verifies the equality of twoRowobjects.Objectget(int index)Retrieves the value of column in theRowat the given index.byte[]getBinary(int index)Retrieves the value of the column at the given index as an array of byte.booleangetBoolean(int index)Retrieves the value of the column at the given index as a boolean value.bytegetByte(int index)Retrieves the value of the column at the given index as a byte value.DategetDate(int index)Retrieves the value of the column at the given index as a Date value.BigDecimalgetDecimal(int index)Retrieves the value of the column at the given index as a BigDecimal value.doublegetDouble(int index)Retrieves the value of the column at the given index as a double value.floatgetFloat(int index)Retrieves the value of the column at the given index as a float value.GeographygetGeography(int index)Retrieves the value of the column at the given index as a Geography value.intgetInt(int index)Retrieves the value of the column at the given index as a int value.List<Variant>getListOfVariant(int index)Retrieves the value of the column at the given index as a list of Variant.longgetLong(int index)Retrieves the value of the column at the given index as a long value.Map<String,Variant>getMapOfVariant(int index)Retrieves the value of the column at the given index as a map of VariantshortgetShort(int index)Retrieves the value of the column at the given index as a short value.StringgetString(int index)Retrieves the value of the column at the given index as a String value.TimegetTime(int index)Retrieves the value of the column at the given index as a Time value.TimestampgetTimestamp(int index)Retrieves the value of the column at the given index as a Timestamp value.VariantgetVariant(int index)Retrieves the value of the column at the given index as a Variant value.inthashCode()Calculates the hash code of this Row objectbooleanisNullAt(int index)Verifies if the value of the column at the given index is null.intsize()Counts the number of column in thisRow.List<Object>toList()Converts thisRowto aListofObject.StringtoString()Generates a string value to represent the content of this row.
-
-
-
Constructor Detail
-
Row
public Row(Object[] values)
Creates aRowbased on the values in the given array.- Parameters:
values-Rowelements- Since:
- 0.9.0
-
-
Method Detail
-
toList
public List<Object> toList()
Converts thisRowto aListofObject.- Returns:
- A
ListcontainsRowelements. - Since:
- 0.9.0
-
size
public int size()
Counts the number of column in thisRow.- Returns:
- An integer number represents the size of this
Row - Since:
- 0.9.0
-
clone
public Row clone()
Creates a clone of thisRowobject.
-
equals
public boolean equals(Object other)
Verifies the equality of twoRowobjects.
-
hashCode
public int hashCode()
Calculates the hash code of this Row object
-
get
public Object get(int index)
Retrieves the value of column in theRowat the given index.- Parameters:
index- The index of the target column- Returns:
- The value of the column at the given index
-
isNullAt
public boolean isNullAt(int index)
Verifies if the value of the column at the given index is null.- Parameters:
index- The index of target column- Returns:
- true if the value is null at the given index
- Since:
- 0.9.0
-
getBoolean
public boolean getBoolean(int index)
Retrieves the value of the column at the given index as a boolean value.- Parameters:
index- The index of target column- Returns:
- The boolean value of the column at the given index
- Since:
- 0.9.0
-
getByte
public byte getByte(int index)
Retrieves the value of the column at the given index as a byte value.- Parameters:
index- The index of target column- Returns:
- The byte value of the column at the given index
- Since:
- 0.9.0
-
getShort
public short getShort(int index)
Retrieves the value of the column at the given index as a short value.- Parameters:
index- The index of target column- Returns:
- The short value of the column at the given index
- Since:
- 0.9.0
-
getInt
public int getInt(int index)
Retrieves the value of the column at the given index as a int value.- Parameters:
index- The index of target column- Returns:
- The int value of the column at the given index
- Since:
- 0.9.0
-
getLong
public long getLong(int index)
Retrieves the value of the column at the given index as a long value.- Parameters:
index- The index of target column- Returns:
- The long value of the column at the given index
- Since:
- 0.9.0
-
getFloat
public float getFloat(int index)
Retrieves the value of the column at the given index as a float value.- Parameters:
index- The index of target column- Returns:
- The float value of the column at the given index
- Since:
- 0.9.0
-
getDouble
public double getDouble(int index)
Retrieves the value of the column at the given index as a double value.- Parameters:
index- The index of target column- Returns:
- The double value of the column at the given index
- Since:
- 0.9.0
-
getString
public String getString(int index)
Retrieves the value of the column at the given index as a String value.- Parameters:
index- The index of target column- Returns:
- The String value of the column at the given index
- Since:
- 0.9.0
-
getBinary
public byte[] getBinary(int index)
Retrieves the value of the column at the given index as an array of byte.- Parameters:
index- The index of target column- Returns:
- An array of byte representing the binary value
- Since:
- 0.9.0
-
getDate
public Date getDate(int index)
Retrieves the value of the column at the given index as a Date value.- Parameters:
index- The index of target column- Returns:
- The Date value of the column at the given index
- Since:
- 0.9.0
-
getTime
public Time getTime(int index)
Retrieves the value of the column at the given index as a Time value.- Parameters:
index- The index of target column- Returns:
- The Time value of the column at the given index
- Since:
- 0.9.0
-
getTimestamp
public Timestamp getTimestamp(int index)
Retrieves the value of the column at the given index as a Timestamp value.- Parameters:
index- The index of target column- Returns:
- The Timestamp value of the column at the given index
- Since:
- 0.9.0
-
getDecimal
public BigDecimal getDecimal(int index)
Retrieves the value of the column at the given index as a BigDecimal value.- Parameters:
index- The index of target column- Returns:
- The BigDecimal value of the column at the given index
- Since:
- 0.9.0
-
getVariant
public Variant getVariant(int index)
Retrieves the value of the column at the given index as a Variant value.- Parameters:
index- The index of target column- Returns:
- The Variant value of the column at the given index
- Since:
- 0.9.0
-
getGeography
public Geography getGeography(int index)
Retrieves the value of the column at the given index as a Geography value.- Parameters:
index- The index of target column- Returns:
- The Geography value of the column at the given index
- Since:
- 0.9.0
-
getListOfVariant
public List<Variant> getListOfVariant(int index)
Retrieves the value of the column at the given index as a list of Variant.- Parameters:
index- The index of target column- Returns:
- A list of Variant
- Since:
- 0.9.0
-
getMapOfVariant
public Map<String,Variant> getMapOfVariant(int index)
Retrieves the value of the column at the given index as a map of Variant- Parameters:
index- The index of target column- Returns:
- A map from String to Variant
- Since:
- 0.9.0
-
toString
public String toString()
Generates a string value to represent the content of this row.
-
-