Package net.snowflake.client.core.arrow
Interface ArrowVectorConverter
-
- All Known Implementing Classes:
ArrayConverter
,BigIntToFixedConverter
,BigIntToScaledFixedConverter
,BigIntToTimeConverter
,BigIntToTimestampLTZConverter
,BigIntToTimestampNTZConverter
,BitToBooleanConverter
,DateConverter
,DecimalToScaledFixedConverter
,DoubleToRealConverter
,IntToFixedConverter
,IntToScaledFixedConverter
,IntToTimeConverter
,MapConverter
,SmallIntToFixedConverter
,SmallIntToScaledFixedConverter
,StructConverter
,ThreeFieldStructToTimestampTZConverter
,TinyIntToFixedConverter
,TinyIntToScaledFixedConverter
,TwoFieldStructToTimestampLTZConverter
,TwoFieldStructToTimestampNTZConverter
,TwoFieldStructToTimestampTZConverter
,VarBinaryToBinaryConverter
,VarCharConverter
,VectorTypeConverter
public interface ArrowVectorConverter
Interface to convert from arrow vector values into java data types.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isNull(int index)
Determine whether source value in arrow vector is null value or notvoid
setSessionTimeZone(TimeZone tz)
void
setTreatNTZAsUTC(boolean isUTC)
void
setUseSessionTimezone(boolean useSessionTimezone)
Set to true when time value should be displayed in wallclock time (no timezone offset)BigDecimal
toBigDecimal(int index)
Convert value in arrow vector to BigDecimalboolean
toBoolean(int index)
Convert value in arrow vector to boolean databyte
toByte(int index)
Convert value in arrow vector to byte databyte[]
toBytes(int index)
Convert value in arrow vector to byte arrayDate
toDate(int index, TimeZone jvmTz, boolean useDateFormat)
Convert value in arrow vector to Datedouble
toDouble(int index)
Convert value in arrow vector to double datafloat
toFloat(int index)
Convert value in arrow vector to float dataint
toInt(int index)
Convert value in arrow vector to int datalong
toLong(int index)
Convert value in arrow vector to long dataObject
toObject(int index)
Convert value in arrow vector to Objectshort
toShort(int index)
Convert value in arrow vector to short dataString
toString(int index)
Convert value in arrow vector to stringTime
toTime(int index)
Convert value in arrow vector to TimeTimestamp
toTimestamp(int index, TimeZone tz)
Convert value in arrow vector to Timestamp
-
-
-
Method Detail
-
setUseSessionTimezone
void setUseSessionTimezone(boolean useSessionTimezone)
Set to true when time value should be displayed in wallclock time (no timezone offset)- Parameters:
useSessionTimezone
-
-
setSessionTimeZone
void setSessionTimeZone(TimeZone tz)
-
isNull
boolean isNull(int index)
Determine whether source value in arrow vector is null value or not- Parameters:
index
- index of value to be checked- Returns:
- true if null value otherwise false
-
toBoolean
boolean toBoolean(int index) throws SFException
Convert value in arrow vector to boolean data- Parameters:
index
- index of the value to be converted in the vector- Returns:
- boolean data converted from arrow vector
- Throws:
SFException
- invalid data conversion
-
toByte
byte toByte(int index) throws SFException
Convert value in arrow vector to byte data- Parameters:
index
- index of the value to be converted in the vector- Returns:
- byte data converted from arrow vector
- Throws:
SFException
- invalid data conversion
-
toShort
short toShort(int index) throws SFException
Convert value in arrow vector to short data- Parameters:
index
- index of the value to be converted in the vector- Returns:
- short data converted from arrow vector
- Throws:
SFException
- invalid data conversion
-
toInt
int toInt(int index) throws SFException
Convert value in arrow vector to int data- Parameters:
index
- index of the value to be converted in the vector- Returns:
- int data converted from arrow vector
- Throws:
SFException
- invalid data conversion
-
toLong
long toLong(int index) throws SFException
Convert value in arrow vector to long data- Parameters:
index
- index of the value to be converted in the vector- Returns:
- long data converted from arrow vector
- Throws:
SFException
- invalid data conversion
-
toDouble
double toDouble(int index) throws SFException
Convert value in arrow vector to double data- Parameters:
index
- index of the value to be converted in the vector- Returns:
- double data converted from arrow vector
- Throws:
SFException
- invalid data conversion
-
toFloat
float toFloat(int index) throws SFException
Convert value in arrow vector to float data- Parameters:
index
- index of the value to be converted in the vector- Returns:
- float data converted from arrow vector
- Throws:
SFException
- invalid data conversion
-
toBytes
byte[] toBytes(int index) throws SFException
Convert value in arrow vector to byte array- Parameters:
index
- index of the value to be converted in the vector- Returns:
- byte array converted from arrow vector
- Throws:
SFException
- invalid data conversion
-
toString
String toString(int index) throws SFException
Convert value in arrow vector to string- Parameters:
index
- index of the value to be converted in the vector- Returns:
- string converted from arrow vector
- Throws:
SFException
- invalid data conversion
-
toDate
Date toDate(int index, TimeZone jvmTz, boolean useDateFormat) throws SFException
Convert value in arrow vector to Date- Parameters:
index
- index of the value to be converted in the vectorjvmTz
- JVM timezoneuseDateFormat
- boolean value to check whether to change timezone or not- Returns:
- Date converted from arrow vector
- Throws:
SFException
- invalid data conversion
-
toTime
Time toTime(int index) throws SFException
Convert value in arrow vector to Time- Parameters:
index
- index of the value to be converted in the vector- Returns:
- Time converted from arrow vector
- Throws:
SFException
- invalid data conversion
-
toTimestamp
Timestamp toTimestamp(int index, TimeZone tz) throws SFException
Convert value in arrow vector to Timestamp- Parameters:
index
- index of the value to be converted in the vectortz
- time zone- Returns:
- Timestamp converted from arrow vector
- Throws:
SFException
- invalid data conversion
-
toBigDecimal
BigDecimal toBigDecimal(int index) throws SFException
Convert value in arrow vector to BigDecimal- Parameters:
index
- index of the value to be converted in the vector- Returns:
- BigDecimal converted from arrow vector
- Throws:
SFException
- invalid data conversion
-
toObject
Object toObject(int index) throws SFException
Convert value in arrow vector to Object- Parameters:
index
- index of the value to be converted in the vector- Returns:
- Object converted from arrow vector
- Throws:
SFException
- invalid data conversion
-
setTreatNTZAsUTC
void setTreatNTZAsUTC(boolean isUTC)
- Parameters:
isUTC
- true or false value of whether NTZ timestamp should be set to UTC
-
-