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 ArrowVectorConverterInterface to convert from arrow vector values into java data types.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisNull(int index)Determine whether source value in arrow vector is null value or notvoidsetSessionTimeZone(TimeZone tz)voidsetTreatNTZAsUTC(boolean isUTC)Set to true if NTZ timestamp should be set to UTCvoidsetUseSessionTimezone(boolean useSessionTimezone)Set to true when time value should be displayed in wallclock time (no timezone offset)BigDecimaltoBigDecimal(int index)Convert value in arrow vector to BigDecimalbooleantoBoolean(int index)Convert value in arrow vector to boolean databytetoByte(int index)Convert value in arrow vector to byte databyte[]toBytes(int index)Convert value in arrow vector to byte arrayDatetoDate(int index, TimeZone jvmTz, boolean useDateFormat)Convert value in arrow vector to DatedoubletoDouble(int index)Convert value in arrow vector to double dataDurationtoDuration(int index)Convert value in arrow vector to DurationfloattoFloat(int index)Convert value in arrow vector to float datainttoInt(int index)Convert value in arrow vector to int datalongtoLong(int index)Convert value in arrow vector to long dataObjecttoObject(int index)Convert value in arrow vector to ObjectPeriodtoPeriod(int index)Convert value in arrow vector to PeriodshorttoShort(int index)Convert value in arrow vector to short dataStringtoString(int index)Convert value in arrow vector to stringTimetoTime(int index)Convert value in arrow vector to TimeTimestamptoTimestamp(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- boolean value indicating if there is a timezone offset.
-
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 SFExceptionConvert 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 SFExceptionConvert 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 SFExceptionConvert 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 SFExceptionConvert 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 SFExceptionConvert 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 SFExceptionConvert 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 SFExceptionConvert 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
-
toPeriod
Period toPeriod(int index) throws SFException
Convert value in arrow vector to Period- Parameters:
index- index of the value to be converted in the vector- Returns:
- Period converted from arrow vector
- Throws:
SFException- invalid data conversion
-
toDuration
Duration toDuration(int index) throws SFException
Convert value in arrow vector to Duration- Parameters:
index- index of the value to be converted in the vector- Returns:
- Duration 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)
Set to true if NTZ timestamp should be set to UTC- Parameters:
isUTC- true or false value of whether NTZ timestamp should be set to UTC
-
-