/// Return a DataFusion [`SessionContext`] that has the passed RecordBatch available as a table
Return a DataFusion [`SessionContext`] that has the passed RecordBatch available as a table
Return a DataFusion [ ` SessionContext ` ] that has the passed RecordBatch available as a table
pub fn context_with_table(batch: RecordBatch) -> SessionContext {
    let schema = batch.schema();
    let provider = MemTable::try_new(schema, vec![vec![batch]]).unwrap();
    let ctx = SessionContext::new();
    ctx.register_table("t", Arc::new(provider)).unwrap();
    ctx
}
pub fn context_with_table ( batch : RecordBatch ) -> SessionContext { let schema = batch . schema ( ) ; let provider = MemTable :: try_new ( schema , vec ! [ vec [ batch ] ] ) . unwrap ( ) ; let ctx = SessionContext :: new ( ) ; ctx . register_table ( " " , Arc :: new ( provider ) ) . unwrap ( ) ; ctx }
Return a DataFusion [`SessionContext`] that has the passed RecordBatch available as a table
Return a DataFusion [ ` SessionContext ` ] that has the passed RecordBatch available as a table
batch
RecordBatch