Registers the given [`RecordBatch`] as the specified table reference.
(
&self,
table_ref: impl Into<TableReference>,
batch: RecordBatch,
)
| 534 | |
| 535 | /// Registers the given [`RecordBatch`] as the specified table reference. |
| 536 | pub fn register_batch( |
| 537 | &self, |
| 538 | table_ref: impl Into<TableReference>, |
| 539 | batch: RecordBatch, |
| 540 | ) -> Result<Option<Arc<dyn TableProvider>>> { |
| 541 | let table = MemTable::try_new(batch.schema(), vec![vec![batch]])?; |
| 542 | self.register_table(table_ref, Arc::new(table)) |
| 543 | } |
| 544 | |
| 545 | /// Return the [RuntimeEnv] used to run queries with this `SessionContext` |
| 546 | pub fn runtime_env(&self) -> Arc<RuntimeEnv> { |