fn compute_pk_schema(chunks: &[Arc<C>]) -> Arc<Schema> {
        let mut pk_schema_merger = SchemaMerger::new();
        for chunk in chunks {
            let chunk_schema = chunk.schema();
            let chunk_pk = chunk_schema.primary_key();
            let chunk_pk_schema = chunk_schema.select_by_names(&chunk_pk).unwrap();
            pk_schema_merger = pk_schema_merger.merge(&chunk_pk_schema).unwrap();
        }
        let pk_schema = pk_schema_merger.build();
        Arc::new(pk_schema)
    }
/// Find the columns needed in the primary key across schemas
///
/// Note by the time we get down here, we have already checked
/// the chunks for compatible schema, so we use unwrap (perhaps
/// famous last words, but true at time of writing)
Find the columns needed in the primary key across schemas
Note by the time we get down here, we have already checked
the chunks for compatible schema, so we use unwrap (perhaps
famous last words, but true at time of writing)
Find the columns needed in the primary key across schemas Note by the time we get down here we have already checked the chunks for compatible schema so we use unwrap ( perhaps famous last words but true at time of writing )
fn compute_pk_schema(chunks: &[Arc<C>]) -> Arc<Schema> {
        let mut pk_schema_merger = SchemaMerger::new();
        for chunk in chunks {
            let chunk_schema = chunk.schema();
            let chunk_pk = chunk_schema.primary_key();
            let chunk_pk_schema = chunk_schema.select_by_names(&chunk_pk).unwrap();
            pk_schema_merger = pk_schema_merger.merge(&chunk_pk_schema).unwrap();
        }
        let pk_schema = pk_schema_merger.build();
        Arc::new(pk_schema)
    }
fn compute_pk_schema ( chunks : & [ Arc < C > ] ) -> Arc < Schema > { let mut pk_schema_merger = SchemaMerger :: new ( ) ; for chunk in chunks { let chunk_schema = chunk . schema ( ) ; let chunk_pk = chunk_schema . primary_key ( ) ; let chunk_pk_schema = chunk_schema . select_by_names ( & chunk_pk ) . unwrap ( ) ; pk_schema_merger = pk_schema_merger . merge ( & chunk_pk_schema ) . unwrap ( ) ; } let pk_schema = pk_schema_merger . build ( ) ; Arc :: new ( pk_schema ) }
Find the columns needed in the primary key across schemas
Note by the time we get down here, we have already checked
the chunks for compatible schema, so we use unwrap (perhaps
famous last words, but true at time of writing)
Find the columns needed in the primary key across schemas Note by the time we get down here we have already checked the chunks for compatible schema so we use unwrap ( perhaps famous last words but true at time of writing )
chunks
&[Arc<C>]
chunks
&[Arc<C>]