Class ArrowResultChunk

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

public class ArrowResultChunk extends AbstractArrowResultChunk
  • Method Details

    • 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