fn compute_pk_schema(chunks: &[Arc<dyn QueryChunk>]) -> Arc<Schema> {
        let mut schema_merger = SchemaMerger::new();
        for chunk in chunks {
            let chunk_schema = chunk.schema();
            for (column_type, field) in chunk_schema.iter() {
                if matches!(
                    column_type,
                    Some(InfluxColumnType::Tag | InfluxColumnType::Timestamp)
                ) {
                    schema_merger
                        .merge_field(field, column_type)
                        .expect("schema mismatch");
                }
            }
        }

        Arc::new(schema_merger.build())
    }
/// Find the columns needed in chunks' primary keys across schemas
Find the columns needed in chunks' primary keys across schemas
Find the columns needed in chunks ' primary keys across schemas
fn compute_pk_schema(chunks: &[Arc<dyn QueryChunk>]) -> Arc<Schema> {
        let mut schema_merger = SchemaMerger::new();
        for chunk in chunks {
            let chunk_schema = chunk.schema();
            for (column_type, field) in chunk_schema.iter() {
                if matches!(
                    column_type,
                    Some(InfluxColumnType::Tag | InfluxColumnType::Timestamp)
                ) {
                    schema_merger
                        .merge_field(field, column_type)
                        .expect("schema mismatch");
                }
            }
        }
        Arc::new(schema_merger.build())
    }
fn compute_pk_schema ( chunks : & [ Arc < dyn QueryChunk > ] ) -> Arc < Schema > { let mut schema_merger = SchemaMerger :: new ( ) ; for chunk in chunks { let chunk_schema = chunk . schema ( ) ; for ( column_type , field ) in chunk_schema . iter ( ) { if matches ! ( column_type Some ( InfluxColumnType Tag InfluxColumnType Timestamp ) ) { schema_merger . merge_field ( field , column_type ) . expect ( " " ) ; } } } Arc :: new ( schema_merger . build ( ) ) }
Find the columns needed in chunks' primary keys across schemas
Find the columns needed in chunks ' primary keys across schemas
chunks
&[Arc<dyn QueryChunk>]
chunks
&[Arc<dyn QueryChunk>]