arrow_flight::encode

Function split_batch_for_grpc_response

Source
fn split_batch_for_grpc_response(
    batch: RecordBatch,
    max_flight_data_size: usize,
) -> Vec<RecordBatch>
Expand description

Split [RecordBatch] so it hopefully fits into a gRPC response.

Data is zero-copy sliced into batches.

Note: this method does not take into account already sliced arrays: https://github.com/apache/arrow-rs/issues/3407