stream_to_file

Function stream_to_file 

Source
pub async fn stream_to_file<E>(
    stream: SendableRecordBatchStream,
    store: ObjectStore,
    path: &str,
    threshold: usize,
    concurrency: usize,
    compression_type: CompressionType,
    encoder_factory: impl Fn(SharedBuffer) -> E,
) -> Result<usize>
Expand description

Streams [SendableRecordBatchStream] to a file with optional compression support. Data is buffered and flushed according to the given threshold. Ensures that writer resources are cleanly released and that an empty file is not created if no rows are written.

Returns the total number of rows successfully written.