pub fn parquet_file_snapshot(chunk: &super::catalog::chunk::CatalogChunk) -> Arc<Self> {
        use super::catalog::chunk::ChunkStage;

        let (state, meta) = match chunk.stage() {
            ChunkStage::Persisted { parquet, meta, .. } => {
                let chunk = Arc::clone(parquet);
                let state = State::ParquetFile { chunk };
                (state, Arc::clone(meta))
            }
            _ => {
                panic!("Internal error: This chunk's stage is not Persisted");
            }
        };
        Arc::new(Self {
            id: chunk.id(),
            table_name: chunk.table_name(),
            meta,
            state,
            access_recorder: chunk.access_recorder().clone(),
            time_of_first_write: chunk.time_of_first_write(),
            time_of_last_write: chunk.time_of_last_write(),
        })
    }
/// Return the snapshot of the chunk with type ParquetFile
/// This function should be only invoked when you know your chunk
/// is ParquetFile type whose state is Persisted. The
/// reason we have this function is because the above snapshot
/// function always returns the read buffer one for the same state
Return the snapshot of the chunk with type ParquetFile
This function should be only invoked when you know your chunk
is ParquetFile type whose state is Persisted. The
reason we have this function is because the above snapshot
function always returns the read buffer one for the same state
Return the snapshot of the chunk with type ParquetFile This function should be only invoked when you know your chunk is ParquetFile type whose state is Persisted . The reason we have this function is because the above snapshot function always returns the read buffer one for the same state
pub fn parquet_file_snapshot(chunk: &super::catalog::chunk::CatalogChunk) -> Arc<Self> {
        use super::catalog::chunk::ChunkStage;
        let (state, meta) = match chunk.stage() {
            ChunkStage::Persisted { parquet, meta, .. } => {
                let chunk = Arc::clone(parquet);
                let state = State::ParquetFile { chunk };
                (state, Arc::clone(meta))
            }
            _ => {
                panic!("Internal error: This chunk's stage is not Persisted");
            }
        };
        Arc::new(Self {
            id: chunk.id(),
            table_name: chunk.table_name(),
            meta,
            state,
            access_recorder: chunk.access_recorder().clone(),
            time_of_first_write: chunk.time_of_first_write(),
            time_of_last_write: chunk.time_of_last_write(),
        })
    }
pub fn parquet_file_snapshot ( chunk : & super :: catalog :: chunk :: CatalogChunk ) -> Arc < Self > { use super :: catalog :: chunk :: ChunkStage ; let ( state , meta ) = match chunk . stage ( ) { ChunkStage :: Persisted { parquet , meta , .. } => { let chunk = Arc :: clone ( parquet ) ; let state = State :: ParquetFile { chunk } ; ( state , Arc :: clone ( meta ) ) } _ => { panic ! ( " " ) ; } } ; Arc :: new ( Self { id : chunk . id ( ) , table_name : chunk . table_name ( ) , meta , state , access_recorder : chunk . access_recorder ( ) . clone ( ) , time_of_first_write : chunk . time_of_first_write ( ) , time_of_last_write : chunk . time_of_last_write ( ) , } ) }
Return the snapshot of the chunk with type ParquetFile
This function should be only invoked when you know your chunk
is ParquetFile type whose state is Persisted.
Return the snapshot of the chunk with type ParquetFile This function should be only invoked when you know your chunk is ParquetFile type whose state is Persisted .
chunk
&super::catalog::chunk::CatalogChunk
chunk
&super::catalog::chunk::CatalogChunk