MCPcopy Create free account
hub / github.com/apache/datafusion / register_tables

Method register_tables

benchmarks/src/bin/external_aggr.rs:242–263  ·  view source on GitHub ↗
(&self, ctx: &SessionContext)

Source from the content-addressed store, hash-verified

240 }
241
242 async fn register_tables(&self, ctx: &SessionContext) -> Result<()> {
243 for table in Self::AGGR_TABLES {
244 let table_provider = { self.get_table(ctx, table).await? };
245
246 if self.mem_table {
247 println!("Loading table '{table}' into memory");
248 let start = Instant::now();
249 let memtable =
250 MemTable::load(table_provider, Some(self.partitions()), &ctx.state())
251 .await?;
252 println!(
253 "Loaded table '{}' into memory in {} ms",
254 table,
255 start.elapsed().as_millis()
256 );
257 ctx.register_table(table, Arc::new(memtable))?;
258 } else {
259 ctx.register_table(table, table_provider)?;
260 }
261 }
262 Ok(())
263 }
264
265 async fn execute_query(
266 &self,

Callers 1

benchmark_queryMethod · 0.45

Calls 5

newFunction · 0.85
get_tableMethod · 0.45
partitionsMethod · 0.45
stateMethod · 0.45
register_tableMethod · 0.45

Tested by

no test coverage detected