Package com.databricks.jdbc.api.impl.arrow

## Class ArrowResultChunk

- java.lang.Object
- - com.databricks.jdbc.api.impl.arrow.AbstractArrowResultChunk
  - - com.databricks.jdbc.api.impl.arrow.ArrowResultChunk

    public class ArrowResultChunk
    extends AbstractArrowResultChunk

### Nested Class Summary

Nested Classes
`static class` `ArrowResultChunk.Builder`

### Field Summary

### Fields inherited from class com.databricks.jdbc.api.impl.arrow.AbstractArrowResultChunk

`arrowMetadata, chunkIndex, chunkLink, chunkReadyFuture, chunkReadyTimeoutSeconds, errorMessage, expiryTime, numRows, recordBatchList, rootAllocator, rowOffset, SECONDS_BUFFER_FOR_EXPIRY, stateMachine, statementId`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static ArrowResultChunk.Builder` `builder()`
`protected void` `downloadData​(IDatabricksHttpClient httpClient, CompressionCodec compressionCodec, double speedThreshold)` Downloads and initializes data for this chunk using the provided HTTP client and compression codec.
`protected void` `handleFailure​(Exception exception, ChunkStatus failedStatus)` Handles a failure during the download or processing of this chunk.

### Methods inherited from class com.databricks.jdbc.api.impl.arrow.AbstractArrowResultChunk

`getArrowMetadata, getChunkIndex, getChunkIterator, getChunkLink, getChunkReadyFuture, getColumnVector, getNumRows, getRecordBatchCountInChunk, getRecordBatchList, getStartRowOffset, getStatus, initializeData, isChunkLinkInvalid, releaseChunk, setChunkLink, setStatus, waitForChunkReady`

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

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

### Method Detail

#### builder

    public static ArrowResultChunk.Builder builder()

#### downloadData

    protected void downloadData​(IDatabricksHttpClient httpClient,
                                CompressionCodec compressionCodec,
                                double speedThreshold)
                         throws DatabricksParsingException,
                                IOException

Downloads and initializes data for this chunk using the provided HTTP client and compression codec.

Downloads and processes the Arrow data chunk using the provided HTTP client and compression codec. Makes a synchronous HTTP GET request to fetch the data, decompresses it, and initializes the chunk's data structures.

Specified by:
  `downloadData` in class `AbstractArrowResultChunk`
Parameters:
  `httpClient` - the HTTP client used to download the chunk data
  `compressionCodec` - the codec used to decompress the downloaded data
  `speedThreshold` - the minimum expected download speed in MB/s for logging warnings
Throws:
  `DatabricksParsingException` - if there is an error parsing or processing the data
  `IOException` - if there is an error during download or data reading

#### handleFailure

    protected void handleFailure​(Exception exception,
                                 ChunkStatus failedStatus)
                          throws DatabricksParsingException

Handles a failure during the download or processing of this chunk.

Handles failures that occur during chunk download or processing. Sets the error message, logs the error, updates the chunk status, and throws a DatabricksParsingException.

Specified by:
  `handleFailure` in class `AbstractArrowResultChunk`
Parameters:
  `exception` - the exception that caused the failure
  `failedStatus` - the status to set for the chunk after failure (e.g. `ChunkStatus.DOWNLOAD_FAILED` or `ChunkStatus.PROCESSING_FAILED`)
Throws:
  `DatabricksParsingException` - always thrown with the error message and original exception