net.snowflake.client.core

## Class SFArrowResultSet

- java.lang.Object
- - net.snowflake.client.core.SFBaseResultSet
  - - net.snowflake.client.core.SFArrowResultSet

All Implemented Interfaces:
  DataConversionContext

    public class SFArrowResultSet
    extends SFBaseResultSet
    implements DataConversionContext

Arrow result set implementation

### Field Summary

Fields
`protected SFStatement` `statement` statement generate current result set

### Fields inherited from class net.snowflake.client.core.SFBaseResultSet

`isClosed, metaDataOfBinds, numberOfBinds, parameters, resultSetMetaData, resultSetSerializable, resultVersion, row, session`

### Constructor Summary

Constructors
Constructor and Description
`SFArrowResultSet(SnowflakeResultSetSerializableV1 resultSetSerializable, Telemetry telemetryClient, boolean sortResult)` This is a minimum initialization for SFArrowResult.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`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)`
`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)`

### Methods inherited from class net.snowflake.client.core.SFBaseResultSet

`absolute, getMetaData, getMetaDataOfBinds, getNumberOfBinds, getResultSetSerializables, getRow, getSession, isBeforeFirst, isClosed, isFirst, previous, relative, setSession, wasNull`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface net.snowflake.client.core.DataConversionContext

`getSession`

### Field Detail

#### statement

    protected SFStatement statement

statement generate current result set

### Constructor Detail

#### SFArrowResultSet

    public SFArrowResultSet(SnowflakeResultSetSerializableV1 resultSetSerializable,
                            Telemetry telemetryClient,
                            boolean sortResult)
                     throws SQLException

This is a minimum initialization for SFArrowResult. Mainly used for testing purpose. However, real prod constructor will call this constructor as well

Parameters:
  `resultSetSerializable` - data returned in query response
  `telemetryClient` - telemetryClient
Throws:
  `SQLException`

### Method Detail

#### next

    public boolean next()
                 throws SFException,
                        SnowflakeSQLException

Advance to next row

Overrides:
  `next` in class `SFBaseResultSet`
Returns:
  true if next row exists, false otherwise
Throws:
  `SFException`
  `SnowflakeSQLException`

#### getByte

    public byte getByte(int columnIndex)
                 throws SFException

Specified by:
  `getByte` in class `SFBaseResultSet`
Throws:
  `SFException`

#### getString

    public String getString(int columnIndex)
                     throws SFException

Specified by:
  `getString` in class `SFBaseResultSet`
Throws:
  `SFException`

#### getBoolean

    public boolean getBoolean(int columnIndex)
                       throws SFException

Specified by:
  `getBoolean` in class `SFBaseResultSet`
Throws:
  `SFException`

#### getShort

    public short getShort(int columnIndex)
                   throws SFException

Specified by:
  `getShort` in class `SFBaseResultSet`
Throws:
  `SFException`

#### getInt

    public int getInt(int columnIndex)
               throws SFException

Specified by:
  `getInt` in class `SFBaseResultSet`
Throws:
  `SFException`

#### getLong

    public long getLong(int columnIndex)
                 throws SFException

Specified by:
  `getLong` in class `SFBaseResultSet`
Throws:
  `SFException`

#### getFloat

    public float getFloat(int columnIndex)
                   throws SFException

Specified by:
  `getFloat` in class `SFBaseResultSet`
Throws:
  `SFException`

#### getDouble

    public double getDouble(int columnIndex)
                     throws SFException

Specified by:
  `getDouble` in class `SFBaseResultSet`
Throws:
  `SFException`

#### getBytes

    public byte[] getBytes(int columnIndex)
                    throws SFException

Specified by:
  `getBytes` in class `SFBaseResultSet`
Throws:
  `SFException`

#### getDate

    public Date getDate(int columnIndex)
                 throws SFException

Specified by:
  `getDate` in class `SFBaseResultSet`
Throws:
  `SFException`

#### getTime

    public Time getTime(int columnIndex)
                 throws SFException

Specified by:
  `getTime` in class `SFBaseResultSet`
Throws:
  `SFException`

#### getTimestamp

    public Timestamp getTimestamp(int columnIndex,
                                  TimeZone tz)
                           throws SFException

Specified by:
  `getTimestamp` in class `SFBaseResultSet`
Throws:
  `SFException`

#### getObject

    public Object getObject(int columnIndex)
                     throws SFException

Specified by:
  `getObject` in class `SFBaseResultSet`
Throws:
  `SFException`

#### getBigDecimal

    public BigDecimal getBigDecimal(int columnIndex)
                             throws SFException

Specified by:
  `getBigDecimal` in class `SFBaseResultSet`
Throws:
  `SFException`

#### getBigDecimal

    public BigDecimal getBigDecimal(int columnIndex,
                                    int scale)
                             throws SFException

Specified by:
  `getBigDecimal` in class `SFBaseResultSet`
Throws:
  `SFException`

#### isLast

    public boolean isLast()

Specified by:
  `isLast` in class `SFBaseResultSet`

#### isAfterLast

    public boolean isAfterLast()

Specified by:
  `isAfterLast` in class `SFBaseResultSet`

#### close

    public void close()
               throws SnowflakeSQLException

Overrides:
  `close` in class `SFBaseResultSet`
Throws:
  `SnowflakeSQLException`

#### closeRootAllocator

    public static void closeRootAllocator(org.apache.arrow.memory.RootAllocator rootAllocator)

#### getStatementType

    public SFStatementType getStatementType()

Specified by:
  `getStatementType` in class `SFBaseResultSet`

#### setStatementType

    public void setStatementType(SFStatementType statementType)

Specified by:
  `setStatementType` in class `SFBaseResultSet`

#### isArrayBindSupported

    public boolean isArrayBindSupported()

Overrides:
  `isArrayBindSupported` in class `SFBaseResultSet`

#### getQueryId

    public String getQueryId()

Specified by:
  `getQueryId` in class `SFBaseResultSet`

#### getTimestampLTZFormatter

    public net.snowflake.common.core.SnowflakeDateTimeFormat getTimestampLTZFormatter()

Description copied from interface: `DataConversionContext`
timestamp_ltz formatter

Specified by:
  `getTimestampLTZFormatter` in interface `DataConversionContext`

#### getTimestampNTZFormatter

    public net.snowflake.common.core.SnowflakeDateTimeFormat getTimestampNTZFormatter()

Description copied from interface: `DataConversionContext`
timestamp_ntz formatter

Specified by:
  `getTimestampNTZFormatter` in interface `DataConversionContext`

#### getTimestampTZFormatter

    public net.snowflake.common.core.SnowflakeDateTimeFormat getTimestampTZFormatter()

Description copied from interface: `DataConversionContext`
timestamp_tz formatter

Specified by:
  `getTimestampTZFormatter` in interface `DataConversionContext`

#### getDateFormatter

    public net.snowflake.common.core.SnowflakeDateTimeFormat getDateFormatter()

Description copied from interface: `DataConversionContext`
date formatter

Specified by:
  `getDateFormatter` in interface `DataConversionContext`

#### getTimeFormatter

    public net.snowflake.common.core.SnowflakeDateTimeFormat getTimeFormatter()

Description copied from interface: `DataConversionContext`
time formatter

Specified by:
  `getTimeFormatter` in interface `DataConversionContext`

#### getBinaryFormatter

    public net.snowflake.common.core.SFBinaryFormat getBinaryFormatter()

Description copied from interface: `DataConversionContext`
binary formatter

Specified by:
  `getBinaryFormatter` in interface `DataConversionContext`

#### getScale

    public int getScale(int columnIndex)

Description copied from interface: `DataConversionContext`
get scale from Snowflake metadata

Specified by:
  `getScale` in interface `DataConversionContext`

#### getTimeZone

    public TimeZone getTimeZone()

Specified by:
  `getTimeZone` in interface `DataConversionContext`
Returns:
  session time zone

#### getHonorClientTZForTimestampNTZ

    public boolean getHonorClientTZForTimestampNTZ()

Specified by:
  `getHonorClientTZForTimestampNTZ` in interface `DataConversionContext`
Returns:
  whether to honor client time zone for timestamp_ntz

#### getResultVersion

    public long getResultVersion()

Specified by:
  `getResultVersion` in interface `DataConversionContext`
Returns:
  result version