Interface ChunkProvider

All Known Implementing Classes:
AbstractRemoteChunkProvider, InlineChunkProvider, RemoteChunkProvider, RemoteChunkProviderV2

public interface ChunkProvider
Implementations of this interface manage the retrieval and iteration over AbstractArrowResultChunks.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes the chunk provider and releases any resources associated with it.
    Retrieves the current chunk of data after a successful call to next().
    long
     
    long
     
    boolean
    Checks if there are more chunks available to iterate over.
    boolean
     
    boolean
    Advances to the next available chunk.
  • Method Details

    • hasNextChunk

      boolean hasNextChunk()
      Checks if there are more chunks available to iterate over.
      Returns:
      true if there are additional chunks to be retrieved; false otherwise.
    • next

      boolean next() throws DatabricksSQLException
      Advances to the next available chunk. This method should be called before calling getChunk() to retrieve the data from the next chunk.
      Returns:
      true if the next chunk was successfully moved to; false if there are no more chunks.
      Throws:
      DatabricksSQLException
    • getChunk

      Retrieves the current chunk of data after a successful call to next().
      Returns:
      The current AbstractArrowResultChunk containing the data.
      Throws:
      DatabricksSQLException - if an error occurs while fetching the chunk.
    • close

      void close()
      Closes the chunk provider and releases any resources associated with it. After calling this method, the chunk provider should not be used again.
    • getRowCount

      long getRowCount()
    • getChunkCount

      long getChunkCount()
    • isClosed

      boolean isClosed()