(
partition_cnt: i32,
sample_cnt: i32,
asc: bool,
use_topk: bool,
use_view: bool,
)
| 75 | } |
| 76 | |
| 77 | async fn create_context( |
| 78 | partition_cnt: i32, |
| 79 | sample_cnt: i32, |
| 80 | asc: bool, |
| 81 | use_topk: bool, |
| 82 | use_view: bool, |
| 83 | ) -> Result<SessionContext> { |
| 84 | let (schema, parts) = make_data(partition_cnt, sample_cnt, asc, use_view).unwrap(); |
| 85 | let mem_table = Arc::new(MemTable::try_new(schema, parts).unwrap()); |
| 86 | |
| 87 | // Create the DataFrame |
| 88 | let mut cfg = SessionConfig::new(); |
| 89 | let opts = cfg.options_mut(); |
| 90 | opts.optimizer.enable_topk_aggregation = use_topk; |
| 91 | let ctx = SessionContext::new_with_config(cfg); |
| 92 | let _ = ctx.register_table("traces", mem_table)?; |
| 93 | |
| 94 | Ok(ctx) |
| 95 | } |
| 96 | |
| 97 | async fn create_context_distinct( |
| 98 | partition_cnt: i32, |
no test coverage detected
searching dependent graphs…