Class ColumnarResponseProcessor
- java.lang.Object
-
- com.databricks.jdbc.api.impl.streaming.ColumnarResponseProcessor
-
- All Implemented Interfaces:
ThriftResponseProcessor<ColumnarRowView>
public class ColumnarResponseProcessor extends Object implements ThriftResponseProcessor<ColumnarRowView>
Processes Thrift responses into columnar view data.This processor converts
TFetchResultsRespintoColumnarRowViewfor Thrift columnar result handling.
-
-
Constructor Summary
Constructors Constructor Description ColumnarResponseProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Consumer<ColumnarRowView>getReleaseAction()Creates a release action for the data type.StreamingBatch<ColumnarRowView>processInitialResponse(TFetchResultsResp response)Processes the initial response and returns batch data.StreamingBatch<ColumnarRowView>processResponse(TFetchResultsResp response, long batchIndex, long rowOffset)Processes a fetched response and returns batch data.
-
-
-
Method Detail
-
processInitialResponse
public StreamingBatch<ColumnarRowView> processInitialResponse(TFetchResultsResp response) throws DatabricksSQLException
Description copied from interface:ThriftResponseProcessorProcesses the initial response and returns batch data.This method is called once when the streaming provider is created. It may perform additional initialization such as caching schema information.
- Specified by:
processInitialResponsein interfaceThriftResponseProcessor<ColumnarRowView>- Parameters:
response- The initial Thrift fetch response- Returns:
- A StreamingBatch containing the processed data
- Throws:
DatabricksSQLException- if processing fails
-
processResponse
public StreamingBatch<ColumnarRowView> processResponse(TFetchResultsResp response, long batchIndex, long rowOffset) throws DatabricksSQLException
Description copied from interface:ThriftResponseProcessorProcesses a fetched response and returns batch data.This method is called for each subsequent batch fetched from the server.
- Specified by:
processResponsein interfaceThriftResponseProcessor<ColumnarRowView>- Parameters:
response- The Thrift fetch responsebatchIndex- The zero-based batch indexrowOffset- The starting row offset for this batch- Returns:
- A StreamingBatch containing the processed data
- Throws:
DatabricksSQLException- if processing fails
-
getReleaseAction
public Consumer<ColumnarRowView> getReleaseAction()
Description copied from interface:ThriftResponseProcessorCreates a release action for the data type.This action is called when the batch is released from memory. For types that require explicit cleanup (like ArrowResultChunk with native memory), this should perform that cleanup. For types that don't need cleanup (like ColumnarRowView), this can be a no-op.
- Specified by:
getReleaseActionin interfaceThriftResponseProcessor<ColumnarRowView>- Returns:
- A Consumer that releases the data
-
-