Interface ChunkProvider
-
- All Known Implementing Classes:
AbstractRemoteChunkProvider,InlineChunkProvider,RemoteChunkProvider,RemoteChunkProviderV2
public interface ChunkProviderImplementations of this interface manage the retrieval and iteration overAbstractArrowResultChunks.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes the chunk provider and releases any resources associated with it.AbstractArrowResultChunkgetChunk()Retrieves the current chunk of data after a successful call tonext().longgetChunkCount()longgetRowCount()booleanhasNextChunk()Checks if there are more chunks available to iterate over.booleanisClosed()booleannext()Advances to the next available chunk.
-
-
-
Method Detail
-
hasNextChunk
boolean hasNextChunk()
Checks if there are more chunks available to iterate over.- Returns:
trueif there are additional chunks to be retrieved;falseotherwise.
-
next
boolean next() throws DatabricksSQLExceptionAdvances to the next available chunk. This method should be called before callinggetChunk()to retrieve the data from the next chunk.- Returns:
trueif the next chunk was successfully moved to;falseif there are no more chunks.- Throws:
DatabricksSQLException
-
getChunk
AbstractArrowResultChunk getChunk() throws DatabricksSQLException
Retrieves the current chunk of data after a successful call tonext().- Returns:
- The current
AbstractArrowResultChunkcontaining 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()
-
-