pub fn read_record_batch<R: Read + Seek>(
    batch: gen::Message::RecordBatch,
    schema: Arc<Schema>,
    is_little_endian: bool,
    dictionaries: &[Option<ArrayRef>],
    reader: &mut R,
    block_offset: u64,
) -> Result<RecordBatch> {
    let buffers = batch
        .buffers()
        .ok_or_else(|| ArrowError::Ipc("Unable to get buffers from IPC RecordBatch".to_string()))?;
    let mut buffers: VecDeque<&gen::Schema::Buffer> = buffers.iter().collect();
    let field_nodes = batch.nodes().ok_or_else(|| {
        ArrowError::Ipc("Unable to get field nodes from IPC RecordBatch".to_string())
    })?;

    // This is a bug fix: we should have one dictionary per node, not schema field
    let dictionaries = dictionaries.iter().chain(std::iter::repeat(&None));

    let mut field_nodes = field_nodes
        .iter()
        .zip(dictionaries)
        .collect::<VecDeque<_>>();

    let arrays = schema
        .fields()
        .iter()
        .map(|field| {
            read(
                &mut field_nodes,
                field.data_type().clone(),
                &mut buffers,
                reader,
                block_offset,
                is_little_endian,
                batch.compression(),
            )
        })
        .collect::<Result<Vec<_>>>()?;

    RecordBatch::try_new(schema.clone(), arrays)
}
/// Creates a record batch from binary data using the `ipc::RecordBatch` indexes and the `Schema`
Creates a record batch from binary data using the `ipc::RecordBatch` indexes and the `Schema`
Creates a record batch from binary data using the ` ipc :: RecordBatch ` indexes and the ` Schema `
pub fn read_record_batch<R: Read + Seek>(
    batch: gen::Message::RecordBatch,
    schema: Arc<Schema>,
    is_little_endian: bool,
    dictionaries: &[Option<ArrayRef>],
    reader: &mut R,
    block_offset: u64,
) -> Result<RecordBatch> {
    let buffers = batch
        .buffers()
        .ok_or_else(|| ArrowError::Ipc("Unable to get buffers from IPC RecordBatch".to_string()))?;
    let mut buffers: VecDeque<&gen::Schema::Buffer> = buffers.iter().collect();
    let field_nodes = batch.nodes().ok_or_else(|| {
        ArrowError::Ipc("Unable to get field nodes from IPC RecordBatch".to_string())
    })?;
    // This is a bug fix: we should have one dictionary per node, not schema field
    let dictionaries = dictionaries.iter().chain(std::iter::repeat(&None));
    let mut field_nodes = field_nodes
        .iter()
        .zip(dictionaries)
        .collect::<VecDeque<_>>();
    let arrays = schema
        .fields()
        .iter()
        .map(|field| {
            read(
                &mut field_nodes,
                field.data_type().clone(),
                &mut buffers,
                reader,
                block_offset,
                is_little_endian,
                batch.compression(),
            )
        })
        .collect::<Result<Vec<_>>>()?;
    RecordBatch::try_new(schema.clone(), arrays)
}
pub fn read_record_batch < R : Read + Seek > ( batch : gen :: Message :: RecordBatch , schema : Arc < Schema > , is_little_endian : bool , dictionaries : & [ Option < ArrayRef > ] , reader : & mut R , block_offset : u64 , ) -> Result < RecordBatch > { let buffers = batch . buffers ( ) . ok_or_else ( | | ArrowError :: Ipc ( " " . to_string ( ) ) ) ? ; let mut buffers : VecDeque < & gen :: Schema :: Buffer > = buffers . iter ( ) . collect ( ) ; let field_nodes = batch . nodes ( ) . ok_or_else ( | | { ArrowError :: Ipc ( " " . to_string ( ) ) } ) ? ; // This is a bug fix: we should have one dictionary per node, not schema field let dictionaries = dictionaries . iter ( ) . chain ( std :: iter :: repeat ( & None ) ) ; let mut field_nodes = field_nodes . iter ( ) . zip ( dictionaries ) . collect :: < VecDeque < _ > > ( ) ; let arrays = schema . fields ( ) . iter ( ) . map ( | field | { read ( & mut field_nodes , field . data_type ( ) . clone ( ) , & mut buffers , reader , block_offset , is_little_endian , batch . compression ( ) , ) } ) . collect :: < Result < Vec < _ > > > ( ) ? ; RecordBatch :: try_new ( schema . clone ( ) , arrays ) }
Creates a record batch from binary data using the `ipc::RecordBatch` indexes and the `Schema`
Creates a record batch from binary data using the ` ipc :: RecordBatch ` indexes and the ` Schema `
batch
gen::Message::RecordBatch
schema
Arc<Schema>
is_little_endian
bool
dictionaries
&[Option<ArrayRef>]
reader
&mut R
block_offset
u64