/// return the first currently open chunk, if any
return the first currently open chunk, if any
return the first currently open chunk if any
pub fn open_chunk(&self, table_name: impl Into<String>) -> Result<Option<Arc<RwLock<Chunk>>>> {
        let table_name = table_name.into();
        match self.tables.get(&table_name) {
            Some(table) => Ok(table
                .chunks
                .values()
                .find(|chunk| {
                    let chunk = chunk.read();
                    matches!(chunk.stage(), ChunkStage::Open { .. })
                })
                .cloned()),
            None => UnknownTable {
                partition_key: self.key(),
                table_name,
            }
            .fail(),
        }
    }
pub fn open_chunk ( & self , table_name : impl Into < String > ) -> Result < Option < Arc < RwLock < Chunk > > > > { let table_name = table_name . into ( ) ; match self . tables . get ( & table_name ) { Some ( table ) => Ok ( table . chunks . values ( ) . find ( | chunk | { let chunk = chunk . read ( ) ; matches ! ( chunk stage ( ) ChunkStage Open { } ) } ) . cloned ( ) ) , None => UnknownTable { partition_key : self . key ( ) , table_name , } . fail ( ) , } }
return the first currently open chunk, if any
return the first currently open chunk if any
&self
table_name
impl Into<String>