/// Create a new Parquet reader execution plan
Create a new Parquet reader execution plan
Create a new Parquet reader execution plan
pub fn new(
        files: Vec<CachedFile>,
        projection: Option<Vec<usize>>,
        batch_size: usize,
        schema: SchemaRef,
    ) -> Self {
        let projection = match projection {
            Some(p) => p,
            None => (0..schema.fields().len()).collect(),
        };
        let projected_schema = Schema::new(
            projection
                .iter()
                .map(|col| schema.field(*col).clone())
                .collect(),
        );
        Self {
            files,
            file_schema: schema,
            projected_schema: Arc::new(projected_schema),
            projection,
            batch_size,
        }
    }
pub fn new ( files : Vec < CachedFile > , projection : Option < Vec < usize > > , batch_size : usize , schema : SchemaRef , ) -> Self { let projection = match projection { Some ( p ) => p , None => ( 0 .. schema . fields ( ) . len ( ) ) . collect ( ) , } ; let projected_schema = Schema :: new ( projection . iter ( ) . map ( | col | schema . field ( * col ) . clone ( ) ) . collect ( ) , ) ; Self { files , file_schema : schema , projected_schema : Arc :: new ( projected_schema ) , projection , batch_size , } }
Create a new Parquet reader execution plan
Create a new Parquet reader execution plan
files
Vec<CachedFile>
projection
Option<Vec<usize>>
batch_size
usize
schema
SchemaRef