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

Method fold_function

src/sql/src/names.rs:2140–2164  ·  view source on GitHub ↗
(
        &mut self,
        node: mz_sql_parser::ast::Function<Raw>,
    )

Source from the content-addressed store, hash-verified

2138 }
2139
2140 fn fold_function(
2141 &mut self,
2142 node: mz_sql_parser::ast::Function<Raw>,
2143 ) -> mz_sql_parser::ast::Function<Aug> {
2144 // Functions implemented as SQL statements can have very deeply nested
2145 // and recursive structures, so need the ability to grow the stack.
2146 mz_ore::stack::maybe_grow(|| {
2147 mz_sql_parser::ast::Function {
2148 name: self.resolve_item_name(
2149 node.name,
2150 // When resolving a function name, only function items should be
2151 // considered.
2152 ItemResolutionConfig {
2153 functions: true,
2154 types: false,
2155 relations: false,
2156 },
2157 ),
2158 args: self.fold_function_args(node.args),
2159 filter: node.filter.map(|expr| Box::new(self.fold_expr(*expr))),
2160 over: node.over.map(|over| self.fold_window_spec(over)),
2161 distinct: node.distinct,
2162 }
2163 })
2164 }
2165
2166 fn fold_table_factor(
2167 &mut self,

Callers 1

fold_table_factorMethod · 0.80

Calls 4

maybe_growFunction · 0.85
fold_exprMethod · 0.80
resolve_item_nameMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected