public class ArrowResultChunk extends SnowflakeResultChunk
| Modifier and Type | Class and Description |
|---|---|
static class |
ArrowResultChunk.ArrowChunkIterator
Iterator class used to go through the arrow chunk row by row
|
SnowflakeResultChunk.DownloadState| Constructor and Description |
|---|
ArrowResultChunk(String url,
int rowCount,
int colCount,
int uncompressedSize,
org.apache.arrow.memory.RootAllocator rootAllocator,
SFBaseSession session) |
| Modifier and Type | Method and Description |
|---|---|
long |
computeNeededChunkMemory()
Compute the memory necessary to store the data of this chunk
|
void |
enableSortFirstResultChunk() |
void |
freeData()
Free the data stored in this chunk.
|
static ArrowResultChunk.ArrowChunkIterator |
getEmptyChunkIterator() |
ArrowResultChunk.ArrowChunkIterator |
getIterator(DataConversionContext dataConversionContext) |
void |
mergeBatchesIntoOne()
merge arrow result chunk with more than one batches into one record batch (Only used for the
first chunk when client side sorting is required)
|
void |
readArrowStream(InputStream is)
Read an inputStream of arrow data bytes and load them into java vectors of value.
|
void |
reset()
Reset all data structure used in this result chunk
|
getColCount, getDownloadCondition, getDownloadError, getDownloadState, getDownloadTime, getLock, getParseTime, getRowCount, getScrubbedUrl, getUncompressedSize, getUrl, isReleased, setDownloadError, setDownloadState, setDownloadTime, setParseTime, setReleasedpublic ArrowResultChunk(String url, int rowCount, int colCount, int uncompressedSize, org.apache.arrow.memory.RootAllocator rootAllocator, SFBaseSession session)
public void readArrowStream(InputStream is) throws IOException
is - inputStream which contains arrow data file in bytesIOException - if failed to read data as arrow filepublic void reset()
SnowflakeResultChunkpublic long computeNeededChunkMemory()
SnowflakeResultChunkpublic void freeData()
SnowflakeResultChunkpublic ArrowResultChunk.ArrowChunkIterator getIterator(DataConversionContext dataConversionContext)
public static ArrowResultChunk.ArrowChunkIterator getEmptyChunkIterator()
public void enableSortFirstResultChunk()
public void mergeBatchesIntoOne()
throws SnowflakeSQLException
SnowflakeSQLExceptionCopyright © 2023. All rights reserved.