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

Method parse_windowless_function

src/sql-parser/src/parser.rs:8546–8557  ·  view source on GitHub ↗

Parses a function call in a position that only permits "windowless" function syntax (PostgreSQL's `func_expr_windowless`): DISTINCT, FILTER, and OVER are not part of the grammar here, which guarantees the planner's invariant that table functions never carry them.

(&mut self)

Source from the content-addressed store, hash-verified

8544 /// FILTER, and OVER are not part of the grammar here, which guarantees
8545 /// the planner's invariant that table functions never carry them.
8546 fn parse_windowless_function(&mut self) -> Result<Function<Raw>, ParserError> {
8547 let name = self.parse_raw_name()?;
8548 self.expect_token(&Token::LParen)?;
8549 let args = self.parse_optional_args(false)?;
8550 Ok(Function {
8551 name,
8552 args,
8553 filter: None,
8554 over: None,
8555 distinct: false,
8556 })
8557 }
8558
8559 fn parse_derived_table_factor(
8560 &mut self,

Callers

nothing calls this directly

Calls 3

parse_raw_nameMethod · 0.80
expect_tokenMethod · 0.80
parse_optional_argsMethod · 0.80

Tested by

no test coverage detected