| 309 | } |
| 310 | |
| 311 | async fn plan_scan( |
| 312 | provider: &PaimonTableProvider, |
| 313 | filters: Vec<Expr>, |
| 314 | limit: Option<usize>, |
| 315 | ) -> Arc<dyn ExecutionPlan> { |
| 316 | let config = SessionConfig::new().with_target_partitions(8); |
| 317 | let ctx = SessionContext::new_with_config(config); |
| 318 | let state = ctx.state(); |
| 319 | provider |
| 320 | .scan(&state, None, &filters, limit) |
| 321 | .await |
| 322 | .expect("scan() should succeed") |
| 323 | } |
| 324 | |
| 325 | fn extract_dt_partition_set(planned_partitions: &[Arc<[DataSplit]>]) -> BTreeSet<String> { |
| 326 | planned_partitions |