(&self, ctx: &SessionContext)
| 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, |
no test coverage detected