(
expr: &SetExpr,
catalog: &dyn SqlCatalog,
functions: &FunctionRegistry,
temporal: crate::TemporalScope,
)
| 52 | } |
| 53 | |
| 54 | fn plan_set_expr( |
| 55 | expr: &SetExpr, |
| 56 | catalog: &dyn SqlCatalog, |
| 57 | functions: &FunctionRegistry, |
| 58 | temporal: crate::TemporalScope, |
| 59 | ) -> Result<SqlPlan> { |
| 60 | match expr { |
| 61 | SetExpr::Select(select) => { |
| 62 | // Wrap in a dummy Query to reuse plan_query. |
| 63 | let query = ast::Query { |
| 64 | with: None, |
| 65 | body: Box::new(SetExpr::Select(select.clone())), |
| 66 | order_by: None, |
| 67 | limit_clause: None, |
| 68 | fetch: None, |
| 69 | locks: Vec::new(), |
| 70 | for_clause: None, |
| 71 | settings: None, |
| 72 | format_clause: None, |
| 73 | pipe_operators: Vec::new(), |
| 74 | }; |
| 75 | super::select::plan_query(&query, catalog, functions, temporal) |
| 76 | } |
| 77 | SetExpr::SetOperation { |
| 78 | op, |
| 79 | left, |
| 80 | right, |
| 81 | set_quantifier, |
| 82 | } => plan_set_operation( |
| 83 | op, |
| 84 | left, |
| 85 | right, |
| 86 | set_quantifier, |
| 87 | catalog, |
| 88 | functions, |
| 89 | temporal, |
| 90 | ), |
| 91 | _ => Err(SqlError::Unsupported { |
| 92 | detail: format!("set expression: {expr}"), |
| 93 | }), |
| 94 | } |
| 95 | } |
no test coverage detected