net.snowflake.client.jdbc

## Class ArrowResultChunk

- java.lang.Object
- - net.snowflake.client.jdbc.SnowflakeResultChunk
  - - net.snowflake.client.jdbc.ArrowResultChunk

    public class ArrowResultChunk
    extends SnowflakeResultChunk

### Nested Class Summary

Nested Classes
`static class` `ArrowResultChunk.ArrowChunkIterator` Iterator class used to go through the arrow chunk row by row

### Nested classes/interfaces inherited from class net.snowflake.client.jdbc.SnowflakeResultChunk

`SnowflakeResultChunk.DownloadState`

### Constructor Summary

Constructors
Constructor and Description
`ArrowResultChunk(String url, int rowCount, int colCount, int uncompressedSize)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`long` `computeNeededChunkMemory()` Compute the memory necessary to store the data of this chunk
`void` `freeData()` Free the data stored in this chunk.
`static ArrowResultChunk.ArrowChunkIterator` `getEmptyChunkIterator()`
`ArrowResultChunk.ArrowChunkIterator` `getIterator(DataConversionContext context)`
`static void` `readArrowStream(InputStream is, ArrowResultChunk resultChunk)` Read an inputStream of arrow data bytes and load them into java vectors of value.

### Methods inherited from class net.snowflake.client.jdbc.SnowflakeResultChunk

`getColCount, getDownloadCondition, getDownloadError, getDownloadState, getDownloadTime, getLock, getParseTime, getRowCount, getScrubbedUrl, getUncompressedSize, getUrl, setDownloadError, setDownloadState, setDownloadTime, setParseTime`

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

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

### Constructor Detail

#### ArrowResultChunk

    public ArrowResultChunk(String url,
                            int rowCount,
                            int colCount,
                            int uncompressedSize)

### Method Detail

#### readArrowStream

    public static void readArrowStream(InputStream is,
                                       ArrowResultChunk resultChunk)
                                throws IOException

Read an inputStream of arrow data bytes and load them into java vectors of value. Note, there is no copy of data involved once data is loaded into memory. a.k.a ArrowStreamReader originally allocates the memory to hold vectors, but those memory ownership is transfer into ArrowResultChunk class and once ArrowStreamReader is garbage collected, memory will not be cleared up

Parameters:
  `is` - inputStream which contain arrow data file in bytes
  `resultChunk` - result chunk that holds the resulted arrow vector
Throws:
  `IOException` - if failed to read data as arrow file

#### computeNeededChunkMemory

    public long computeNeededChunkMemory()

Description copied from class: `SnowflakeResultChunk`
Compute the memory necessary to store the data of this chunk

Returns:
  necessary memory in bytes

#### freeData

    public void freeData()

Description copied from class: `SnowflakeResultChunk`
Free the data stored in this chunk. Called when finish consuming the chunk

#### getIterator

    public ArrowResultChunk.ArrowChunkIterator getIterator(DataConversionContext context)

Returns:
  an iterator to iterate over current chunk

#### getEmptyChunkIterator

    public static ArrowResultChunk.ArrowChunkIterator getEmptyChunkIterator()