fn build(self, ctx: &mut SessionContext) {
        let Self {
            table_name,
            batches,
        } = self;

        let schema = if batches.is_empty() {
            panic!("No batches for ChunksTableBuilder");
        } else {
            batches[0].schema()
        };

        let partitions = batches
            .into_iter()
            .map(|batch| vec![batch])
            .collect::<Vec<_>>();

        let memtable = MemTable::try_new(schema, partitions).expect("creating memtable");

        ctx.register_table(table_name.as_str(), Arc::new(memtable))
            .ok();
    }
/// register a table provider  for this sytem table
register a table provider  for this sytem table
register a table provider for this sytem table
fn build(self, ctx: &mut SessionContext) {
        let Self {
            table_name,
            batches,
        } = self;
        let schema = if batches.is_empty() {
            panic!("No batches for ChunksTableBuilder");
        } else {
            batches[0].schema()
        };
        let partitions = batches
            .into_iter()
            .map(|batch| vec![batch])
            .collect::<Vec<_>>();
        let memtable = MemTable::try_new(schema, partitions).expect("creating memtable");
        ctx.register_table(table_name.as_str(), Arc::new(memtable))
            .ok();
    }
fn build ( self , ctx : & mut SessionContext ) { let Self { table_name , batches , } = self ; let schema = if batches . is_empty ( ) { panic ! ( " " ) ; } else { batches [ 0 ] . schema ( ) } ; let partitions = batches . into_iter ( ) . map ( | batch | vec ! [ batch ] ) . collect :: < Vec < _ > > ( ) ; let memtable = MemTable :: try_new ( schema , partitions ) . expect ( " " ) ; ctx . register_table ( table_name . as_str ( ) , Arc :: new ( memtable ) ) . ok ( ) ; }
register a table provider  for this sytem table
register a table provider for this sytem table
self
ctx
&mut SessionContext
self
ctx
&mut SessionContext