(sql: &str)
| 5047 | ); |
| 5048 | |
| 5049 | fn plan_sql(sql: &str) -> LogicalPlan { |
| 5050 | let options = ParserOptions::default(); |
| 5051 | let dialect = &GenericDialect {}; |
| 5052 | let state = MockSessionState::default() |
| 5053 | .with_scalar_function(make_array_udf()) |
| 5054 | .with_expr_planner(Arc::new(CustomExprPlanner {})) |
| 5055 | .with_type_planner(Arc::new(CustomTypePlanner {})); |
| 5056 | let context = MockContextProvider { state }; |
| 5057 | let planner = SqlToRel::new_with_options(&context, options); |
| 5058 | let result = DFParser::parse_sql_with_dialect(sql, dialect); |
| 5059 | let mut ast = result.unwrap(); |
| 5060 | planner.statement_to_plan(ast.pop_front().unwrap()).unwrap() |
| 5061 | } |
| 5062 | |
| 5063 | let plan = plan_sql(sql); |
| 5064 |
no test coverage detected
searching dependent graphs…