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

Class Function

src/sql-parser/src/ast/defs/expr.rs:1283–1291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1281/// A function call
1282#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
1283pub struct Function<T: AstInfo> {
1284 pub name: T::ItemName,
1285 pub args: FunctionArgs<T>,
1286 // aggregate functions may specify e.g. `COUNT(DISTINCT X) FILTER (WHERE ...)`
1287 pub filter: Option<Box<Expr<T>>>,
1288 pub over: Option<WindowSpec<T>>,
1289 // aggregate functions may specify eg `COUNT(DISTINCT x)`
1290 pub distinct: bool,
1291}
1292
1293impl<T: AstInfo> AstDisplay for Function<T> {
1294 fn fmt<W: fmt::Write>(&self, f: &mut AstFormatter<W>) {

Callers 15

plan_aggMethod · 0.85
plan_select_from_whereFunction · 0.85
parse_prefixMethod · 0.85
parse_extract_exprMethod · 0.85
parse_trim_exprMethod · 0.85
parse_position_exprMethod · 0.85
parse_normalize_exprMethod · 0.85
parse_infixMethod · 0.85
parse_substring_exprMethod · 0.85
callMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_resolve_star_argsFunction · 0.68