fn table(&self, table_name: &str) -> Option<Arc<dyn TableProvider>> {
        let schema = {
            let table = self.catalog.table(table_name).ok()?;
            Arc::clone(&table.schema().read())
        };

        let mut builder = ProviderBuilder::new(table_name, schema);
        builder =
            builder.add_pruner(Arc::clone(&self.chunk_access) as Arc<dyn ChunkPruner<DbChunk>>);

        let predicate = PredicateBuilder::new().table(table_name).build();

        for chunk in self.chunk_access.candidate_chunks(&predicate) {
            builder = builder.add_chunk(chunk);
        }

        match builder.build() {
            Ok(provider) => Some(Arc::new(provider)),
            Err(e) => panic!("unexpected error: {:?}", e),
        }
    }
/// Create a table provider for the named table
Create a table provider for the named table
Create a table provider for the named table
fn table(&self, table_name: &str) -> Option<Arc<dyn TableProvider>> {
        let schema = {
            let table = self.catalog.table(table_name).ok()?;
            Arc::clone(&table.schema().read())
        };
        let mut builder = ProviderBuilder::new(table_name, schema);
        builder =
            builder.add_pruner(Arc::clone(&self.chunk_access) as Arc<dyn ChunkPruner<DbChunk>>);
        let predicate = PredicateBuilder::new().table(table_name).build();
        for chunk in self.chunk_access.candidate_chunks(&predicate) {
            builder = builder.add_chunk(chunk);
        }
        match builder.build() {
            Ok(provider) => Some(Arc::new(provider)),
            Err(e) => panic!("unexpected error: {:?}", e),
        }
    }
fn table ( & self , table_name : & str ) -> Option < Arc < dyn TableProvider > > { let schema = { let table = self . catalog . table ( table_name ) . ok ( ) ? ; Arc :: clone ( & table . schema ( ) . read ( ) ) } ; let mut builder = ProviderBuilder :: new ( table_name , schema ) ; builder = builder . add_pruner ( Arc :: clone ( & self . chunk_access ) as Arc < dyn ChunkPruner < DbChunk > > ) ; let predicate = PredicateBuilder :: new ( ) . table ( table_name ) . build ( ) ; for chunk in self . chunk_access . candidate_chunks ( & predicate ) { builder = builder . add_chunk ( chunk ) ; } match builder . build ( ) { Ok ( provider ) => Some ( Arc :: new ( provider ) ) , Err ( e ) => panic ! ( " " e ) , } }
Create a table provider for the named table
Create a table provider for the named table
&self
table_name
&str
&self
table_name
&str