MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / plan_agg

Method plan_agg

src/sql/src/plan/transform_ast.rs:114–138  ·  view source on GitHub ↗
(
        &mut self,
        name: ResolvedItemName,
        expr: Expr<Aug>,
        order_by: Vec<OrderByExpr<Aug>>,
        filter: Option<Box<Expr<Aug>>>,
        distinct: bool,
        over: Opt

Source from the content-addressed store, hash-verified

112 }
113
114 fn plan_agg(
115 &mut self,
116 name: ResolvedItemName,
117 expr: Expr<Aug>,
118 order_by: Vec<OrderByExpr<Aug>>,
119 filter: Option<Box<Expr<Aug>>>,
120 distinct: bool,
121 over: Option<WindowSpec<Aug>>,
122 ) -> Expr<Aug> {
123 if self.rewriting_table_factor && self.status.is_ok() {
124 self.status = Err(PlanError::Unstructured(
125 "aggregate functions are not supported in functions in FROM".to_string(),
126 ))
127 }
128 Expr::Function(Function {
129 name,
130 args: FunctionArgs::Args {
131 args: vec![expr],
132 order_by,
133 },
134 filter,
135 over,
136 distinct,
137 })
138 }
139
140 fn plan_avg(
141 &mut self,

Callers 5

plan_avgMethod · 0.80
plan_avg_internal_v1Method · 0.80
plan_varianceMethod · 0.80
plan_bool_andMethod · 0.80
plan_bool_orMethod · 0.80

Calls 2

FunctionClass · 0.85
to_stringMethod · 0.45

Tested by

no test coverage detected