(sql: &str, dialect: &dyn Dialect)
| 3508 | } |
| 3509 | |
| 3510 | fn logical_plan_with_dialect(sql: &str, dialect: &dyn Dialect) -> Result<LogicalPlan> { |
| 3511 | let state = MockSessionState::default() |
| 3512 | .with_aggregate_function(sum_udaf()) |
| 3513 | .with_higher_order_function(Arc::new(HigherOrderUDF::new_from_impl( |
| 3514 | MockArrayReduce::new(), |
| 3515 | ))) |
| 3516 | .with_scalar_function(make_array_udf()) |
| 3517 | .with_expr_planner(Arc::new(CustomExprPlanner {})); // plan array literal |
| 3518 | let context = MockContextProvider { state }; |
| 3519 | let planner = SqlToRel::new(&context); |
| 3520 | let result = DFParser::parse_sql_with_dialect(sql, dialect); |
| 3521 | let mut ast = result?; |
| 3522 | planner.statement_to_plan(ast.pop_front().unwrap()) |
| 3523 | } |
| 3524 | |
| 3525 | fn logical_plan_with_dialect_and_options( |
| 3526 | sql: &str, |
no test coverage detected
searching dependent graphs…