/// Returns a RecordBatch with the given selection
Returns a RecordBatch with the given selection
Returns a RecordBatch with the given selection
pub fn read_filter(&self, selection: Selection<'_>) -> Result<RecordBatch> {
        Ok(match selection {
            Selection::All => self.batch.clone(),
            Selection::Some(columns) => {
                let projection = self.schema.select(columns).context(SelectColumns)?;
                let schema = self.schema.project(&projection).into();
                let columns = projection
                    .into_iter()
                    .map(|x| Arc::clone(self.batch.column(x)))
                    .collect();
                RecordBatch::try_new(schema, columns).expect("failed to project record batch")
            }
        })
    }
pub fn read_filter ( & self , selection : Selection < ' _ > ) -> Result < RecordBatch > { Ok ( match selection { Selection :: All => self . batch . clone ( ) , Selection :: Some ( columns ) => { let projection = self . schema . select ( columns ) . context ( SelectColumns ) ? ; let schema = self . schema . project ( & projection ) . into ( ) ; let columns = projection . into_iter ( ) . map ( | x | Arc :: clone ( self . batch . column ( x ) ) ) . collect ( ) ; RecordBatch :: try_new ( schema , columns ) . expect ( " " ) } } ) }
Returns a RecordBatch with the given selection
Returns a RecordBatch with the given selection
&self
selection
Selection<'_>