MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / plan_set_expr

Function plan_set_expr

nodedb-sql/src/planner/union.rs:54–95  ·  view source on GitHub ↗
(
    expr: &SetExpr,
    catalog: &dyn SqlCatalog,
    functions: &FunctionRegistry,
    temporal: crate::TemporalScope,
)

Source from the content-addressed store, hash-verified

52}
53
54fn 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}

Callers 1

plan_set_operationFunction · 0.85

Calls 3

plan_queryFunction · 0.85
plan_set_operationFunction · 0.85
cloneMethod · 0.45

Tested by

no test coverage detected