pub async fn new_querier_parquet_chunk(
        &self,
        decoded_parquet_file: &DecodedParquetFile,
    ) -> Option<QuerierParquetChunk> {
        let parquet_file_id = decoded_parquet_file.parquet_file_id();
        let table_id = decoded_parquet_file.table_id();

        let chunk = Arc::new(self.new_parquet_chunk(decoded_parquet_file).await?);
        let chunk_id = ChunkId::from(Uuid::from_u128(parquet_file_id.get() as _));
        let table_name = self.catalog_cache.table().name(table_id).await?;

        // Somewhat hacky workaround because of implicit chunk orders, use min sequence number and
        // hope it doesn't overflow u32. Order is non-zero, se we need to add 1.
        let order = ChunkOrder::new(1 + decoded_parquet_file.min_sequence_number().get() as u32)
            .expect("cannot be zero");

        // Read partition sort key
        let partition_sort_key = self
            .catalog_cache()
            .partition()
            .sort_key(decoded_parquet_file.partition_id())
            .await;

        let meta = Arc::new(ChunkMeta {
            chunk_id,
            table_name,
            order,
            sort_key: decoded_parquet_file.sort_key().cloned(),
            sequencer_id: decoded_parquet_file.sequencer_id(),
            partition_id: decoded_parquet_file.partition_id(),
            min_sequence_number: decoded_parquet_file.min_sequence_number(),
            max_sequence_number: decoded_parquet_file.max_sequence_number(),
        });

        Some(QuerierParquetChunk::new(
            parquet_file_id,
            chunk,
            meta,
            partition_sort_key,
        ))
    }
/// Create new querier Parquet chunk.
///
/// Returns `None` if some data required to create this chunk is already gone from the catalog.
///
/// CURRENTLY UNUSED: The querier is creating and caching read buffer chunks instead, using
/// the `new_rb_chunk` method.
Create new querier Parquet chunk.
Returns `None` if some data required to create this chunk is already gone from the catalog.

CURRENTLY UNUSED: The querier is creating and caching read buffer chunks instead, using
the `new_rb_chunk` method.
Create new querier Parquet chunk . Returns ` None ` if some data required to create this chunk is already gone from the catalog . CURRENTLY UNUSED : The querier is creating and caching read buffer chunks instead using the ` new_rb_chunk ` method .
pub async fn new_querier_parquet_chunk(
        &self,
        decoded_parquet_file: &DecodedParquetFile,
    ) -> Option<QuerierParquetChunk> {
        let parquet_file_id = decoded_parquet_file.parquet_file_id();
        let table_id = decoded_parquet_file.table_id();
        let chunk = Arc::new(self.new_parquet_chunk(decoded_parquet_file).await?);
        let chunk_id = ChunkId::from(Uuid::from_u128(parquet_file_id.get() as _));
        let table_name = self.catalog_cache.table().name(table_id).await?;
        // Somewhat hacky workaround because of implicit chunk orders, use min sequence number and
        // hope it doesn't overflow u32. Order is non-zero, se we need to add 1.
        let order = ChunkOrder::new(1 + decoded_parquet_file.min_sequence_number().get() as u32)
            .expect("cannot be zero");
        // Read partition sort key
        let partition_sort_key = self
            .catalog_cache()
            .partition()
            .sort_key(decoded_parquet_file.partition_id())
            .await;
        let meta = Arc::new(ChunkMeta {
            chunk_id,
            table_name,
            order,
            sort_key: decoded_parquet_file.sort_key().cloned(),
            sequencer_id: decoded_parquet_file.sequencer_id(),
            partition_id: decoded_parquet_file.partition_id(),
            min_sequence_number: decoded_parquet_file.min_sequence_number(),
            max_sequence_number: decoded_parquet_file.max_sequence_number(),
        });
        Some(QuerierParquetChunk::new(
            parquet_file_id,
            chunk,
            meta,
            partition_sort_key,
        ))
    }
pub async fn new_querier_parquet_chunk ( & self , decoded_parquet_file : & DecodedParquetFile , ) -> Option < QuerierParquetChunk > { let parquet_file_id = decoded_parquet_file . parquet_file_id ( ) ; let table_id = decoded_parquet_file . table_id ( ) ; let chunk = Arc :: new ( self . new_parquet_chunk ( decoded_parquet_file ) . await ? ) ; let chunk_id = ChunkId :: from ( Uuid :: from_u128 ( parquet_file_id . get ( ) as _ ) ) ; let table_name = self . catalog_cache . table ( ) . name ( table_id ) . await ? ; // Somewhat hacky workaround because of implicit chunk orders, use min sequence number and // hope it doesn't overflow u32. Order is non-zero, se we need to add 1. let order = ChunkOrder :: new ( 1 + decoded_parquet_file . min_sequence_number ( ) . get ( ) as u32 ) . expect ( " " ) ; // Read partition sort key let partition_sort_key = self . catalog_cache ( ) . partition ( ) . sort_key ( decoded_parquet_file . partition_id ( ) ) . await ; let meta = Arc :: new ( ChunkMeta { chunk_id , table_name , order , sort_key : decoded_parquet_file . sort_key ( ) . cloned ( ) , sequencer_id : decoded_parquet_file . sequencer_id ( ) , partition_id : decoded_parquet_file . partition_id ( ) , min_sequence_number : decoded_parquet_file . min_sequence_number ( ) , max_sequence_number : decoded_parquet_file . max_sequence_number ( ) , } ) ; Some ( QuerierParquetChunk :: new ( parquet_file_id , chunk , meta , partition_sort_key , ) ) }
Create new querier Parquet chunk.
Create new querier Parquet chunk .
&self
decoded_parquet_file
&DecodedParquetFile
&self
decoded_parquet_file
&DecodedParquetFile