risingwave_frontend/planner/
set_expr.rs1use risingwave_common::util::sort_util::ColumnOrder;
16
17use crate::binder::BoundSetExpr;
18use crate::error::Result;
19use crate::expr::ExprImpl;
20use crate::optimizer::plan_node::PlanRef;
21use crate::planner::Planner;
22
23impl Planner {
24 pub(super) fn plan_set_expr(
25 &mut self,
26 set_expr: BoundSetExpr,
27 extra_order_exprs: Vec<ExprImpl>,
28 order: &[ColumnOrder],
29 ) -> Result<PlanRef> {
30 match set_expr {
31 BoundSetExpr::Select(s) => self.plan_select(*s, extra_order_exprs, order),
32 BoundSetExpr::Values(v) => self.plan_values(*v),
33 BoundSetExpr::Query(q) => Ok(self.plan_query(*q)?.into_unordered_subplan()),
34 BoundSetExpr::SetOperation {
35 op,
36 all,
37 corresponding_col_indices,
38 left,
39 right,
40 } => self.plan_set_operation(op, all, corresponding_col_indices, *left, *right),
41 }
42 }
43}