pub(crate) fn new_from_batch(batch: &RecordBatch) -> Self {
        let num_rows = batch.num_rows();
        Self {
            // a batch is treated as all-defined
            definition: vec![1; num_rows],
            // a batch has no repetition as it is not a list
            repetition: None,
            // all values of a batch as deemed to be defined at level 1
            definition_mask: vec![(true, 1); num_rows],
            // a batch has sequential offsets, should be num_rows + 1
            array_offsets: (0..=(num_rows as i64)).collect(),
            // all values at a batch-level are non-null
            array_mask: vec![true; num_rows],
            max_definition: 1,
            is_list: false,
            // a batch is treated as nullable even though it has no nulls,
            // this is required to compute nested type levels correctly
            is_nullable: true,
        }
    }
/// Create a new [LevelInfo] from a record batch.
///
/// This is a convenience function to populate the starting point of the traversal.
Create a new [LevelInfo] from a record batch.
This is a convenience function to populate the starting point of the traversal.
Create a new [ LevelInfo ] from a record batch . This is a convenience function to populate the starting point of the traversal .
pub(crate) fn new_from_batch(batch: &RecordBatch) -> Self {
        let num_rows = batch.num_rows();
        Self {
            // a batch is treated as all-defined
            definition: vec![1; num_rows],
            // a batch has no repetition as it is not a list
            repetition: None,
            // all values of a batch as deemed to be defined at level 1
            definition_mask: vec![(true, 1); num_rows],
            // a batch has sequential offsets, should be num_rows + 1
            array_offsets: (0..=(num_rows as i64)).collect(),
            // all values at a batch-level are non-null
            array_mask: vec![true; num_rows],
            max_definition: 1,
            is_list: false,
            // a batch is treated as nullable even though it has no nulls,
            // this is required to compute nested type levels correctly
            is_nullable: true,
        }
    }
pub ( crate ) fn new_from_batch ( batch : & RecordBatch ) -> Self { let num_rows = batch . num_rows ( ) ; Self { // a batch is treated as all-defined definition : vec ! [ 1 num_rows ] , // a batch has no repetition as it is not a list repetition : None , // all values of a batch as deemed to be defined at level 1 definition_mask : vec ! [ ( true 1 ) num_rows ] , // a batch has sequential offsets, should be num_rows + 1 array_offsets : ( 0 ..= ( num_rows as i64 ) ) . collect ( ) , // all values at a batch-level are non-null array_mask : vec ! [ true num_rows ] , max_definition : 1 , is_list : false , // a batch is treated as nullable even though it has no nulls, // this is required to compute nested type levels correctly is_nullable : true , } }
Create a new [LevelInfo] from a record batch.
Create a new [ LevelInfo ] from a record batch .
batch
&RecordBatch
batch
&RecordBatch