proofframe 0.7.2

Rust-native Arrow contracts, exact checks, fingerprints, and verifiable evidence
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
#![allow(dead_code)]

use arrow::error::ArrowError;
use arrow::record_batch::{RecordBatch, RecordBatchIterator, RecordBatchReader};

pub fn reader_from_batches(batches: Vec<RecordBatch>) -> impl RecordBatchReader {
    let schema = batches.first().expect("at least one batch").schema();
    RecordBatchIterator::new(
        batches.into_iter().map(Ok::<RecordBatch, ArrowError>),
        schema,
    )
}