public class SFArrowResultSet extends SFBaseResultSet implements DataConversionContext
| Modifier and Type | Field and Description |
|---|---|
protected SFBaseStatement |
statement
statement generate current result set
|
isClosed, metaDataOfBinds, numberOfBinds, parameters, resultSetMetaData, resultSetSerializable, resultVersion, row, session| Constructor and Description |
|---|
SFArrowResultSet(SnowflakeResultSetSerializableV1 resultSetSerializable,
SFBaseSession session,
SFBaseStatement statement,
boolean sortResult)
Constructor takes a result from the API response that we get from executing a SQL statement.
|
SFArrowResultSet(SnowflakeResultSetSerializableV1 resultSetSerializable,
Telemetry telemetryClient,
boolean sortResult)
This is a minimum initialization for SFArrowResult.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static void |
closeRootAllocator(org.apache.arrow.memory.RootAllocator rootAllocator) |
BigDecimal |
getBigDecimal(int columnIndex) |
BigDecimal |
getBigDecimal(int columnIndex,
int scale) |
net.snowflake.common.core.SFBinaryFormat |
getBinaryFormatter()
binary formatter
|
boolean |
getBoolean(int columnIndex) |
byte |
getByte(int columnIndex) |
byte[] |
getBytes(int columnIndex) |
Date |
getDate(int columnIndex,
TimeZone tz) |
net.snowflake.common.core.SnowflakeDateTimeFormat |
getDateFormatter()
date formatter
|
double |
getDouble(int columnIndex) |
float |
getFloat(int columnIndex) |
boolean |
getHonorClientTZForTimestampNTZ() |
int |
getInt(int columnIndex) |
long |
getLong(int columnIndex) |
Object |
getObject(int columnIndex) |
String |
getQueryId() |
long |
getResultVersion() |
int |
getScale(int columnIndex)
get scale from Snowflake metadata
|
short |
getShort(int columnIndex) |
SFStatementType |
getStatementType() |
String |
getString(int columnIndex) |
Time |
getTime(int columnIndex) |
net.snowflake.common.core.SnowflakeDateTimeFormat |
getTimeFormatter()
time formatter
|
Timestamp |
getTimestamp(int columnIndex,
TimeZone tz) |
net.snowflake.common.core.SnowflakeDateTimeFormat |
getTimestampLTZFormatter()
timestamp_ltz formatter
|
net.snowflake.common.core.SnowflakeDateTimeFormat |
getTimestampNTZFormatter()
timestamp_ntz formatter
|
net.snowflake.common.core.SnowflakeDateTimeFormat |
getTimestampTZFormatter()
timestamp_tz formatter
|
TimeZone |
getTimeZone() |
boolean |
isAfterLast() |
boolean |
isArrayBindSupported() |
boolean |
isLast() |
boolean |
next()
Advance to next row
|
void |
setStatementType(SFStatementType statementType) |
absolute, getMetaData, getMetaDataOfBinds, getNumberOfBinds, getResultSetSerializables, getRow, getSession, isBeforeFirst, isClosed, isFirst, previous, relative, setSession, wasNullclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSessionprotected SFBaseStatement statement
public SFArrowResultSet(SnowflakeResultSetSerializableV1 resultSetSerializable, SFBaseSession session, SFBaseStatement statement, boolean sortResult) throws SQLException
The constructor will initialize the ResultSetMetaData.
resultSetSerializable - result data after parsing jsonsession - SFBaseSession objectstatement - statement objectsortResult - true if sort results otherwise falseSQLException - exception raised from general SQL layerspublic SFArrowResultSet(SnowflakeResultSetSerializableV1 resultSetSerializable, Telemetry telemetryClient, boolean sortResult) throws SQLException
resultSetSerializable - data returned in query responsetelemetryClient - telemetryClientSQLExceptionpublic boolean next()
throws SFException,
SnowflakeSQLException
next in class SFBaseResultSetSFExceptionSnowflakeSQLExceptionpublic byte getByte(int columnIndex)
throws SFException
getByte in class SFBaseResultSetSFExceptionpublic String getString(int columnIndex) throws SFException
getString in class SFBaseResultSetSFExceptionpublic boolean getBoolean(int columnIndex)
throws SFException
getBoolean in class SFBaseResultSetSFExceptionpublic short getShort(int columnIndex)
throws SFException
getShort in class SFBaseResultSetSFExceptionpublic int getInt(int columnIndex)
throws SFException
getInt in class SFBaseResultSetSFExceptionpublic long getLong(int columnIndex)
throws SFException
getLong in class SFBaseResultSetSFExceptionpublic float getFloat(int columnIndex)
throws SFException
getFloat in class SFBaseResultSetSFExceptionpublic double getDouble(int columnIndex)
throws SFException
getDouble in class SFBaseResultSetSFExceptionpublic byte[] getBytes(int columnIndex)
throws SFException
getBytes in class SFBaseResultSetSFExceptionpublic Date getDate(int columnIndex, TimeZone tz) throws SFException
getDate in class SFBaseResultSetSFExceptionpublic Time getTime(int columnIndex) throws SFException
getTime in class SFBaseResultSetSFExceptionpublic Timestamp getTimestamp(int columnIndex, TimeZone tz) throws SFException
getTimestamp in class SFBaseResultSetSFExceptionpublic Object getObject(int columnIndex) throws SFException
getObject in class SFBaseResultSetSFExceptionpublic BigDecimal getBigDecimal(int columnIndex) throws SFException
getBigDecimal in class SFBaseResultSetSFExceptionpublic BigDecimal getBigDecimal(int columnIndex, int scale) throws SFException
getBigDecimal in class SFBaseResultSetSFExceptionpublic boolean isLast()
isLast in class SFBaseResultSetpublic boolean isAfterLast()
isAfterLast in class SFBaseResultSetpublic void close()
throws SnowflakeSQLException
close in class SFBaseResultSetSnowflakeSQLExceptionpublic static void closeRootAllocator(org.apache.arrow.memory.RootAllocator rootAllocator)
public SFStatementType getStatementType()
getStatementType in class SFBaseResultSetpublic void setStatementType(SFStatementType statementType)
setStatementType in class SFBaseResultSetpublic boolean isArrayBindSupported()
isArrayBindSupported in class SFBaseResultSetpublic String getQueryId()
getQueryId in class SFBaseResultSetpublic net.snowflake.common.core.SnowflakeDateTimeFormat getTimestampLTZFormatter()
DataConversionContextgetTimestampLTZFormatter in interface DataConversionContextpublic net.snowflake.common.core.SnowflakeDateTimeFormat getTimestampNTZFormatter()
DataConversionContextgetTimestampNTZFormatter in interface DataConversionContextpublic net.snowflake.common.core.SnowflakeDateTimeFormat getTimestampTZFormatter()
DataConversionContextgetTimestampTZFormatter in interface DataConversionContextpublic net.snowflake.common.core.SnowflakeDateTimeFormat getDateFormatter()
DataConversionContextgetDateFormatter in interface DataConversionContextpublic net.snowflake.common.core.SnowflakeDateTimeFormat getTimeFormatter()
DataConversionContextgetTimeFormatter in interface DataConversionContextpublic net.snowflake.common.core.SFBinaryFormat getBinaryFormatter()
DataConversionContextgetBinaryFormatter in interface DataConversionContextpublic int getScale(int columnIndex)
DataConversionContextgetScale in interface DataConversionContextpublic TimeZone getTimeZone()
getTimeZone in interface DataConversionContextpublic boolean getHonorClientTZForTimestampNTZ()
getHonorClientTZForTimestampNTZ in interface DataConversionContextpublic long getResultVersion()
getResultVersion in interface DataConversionContextCopyright © 2022. All rights reserved.