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

Method parse_table_factor

src/sql-parser/src/parser.rs:8392–8400  ·  view source on GitHub ↗

A table name or a parenthesized subquery, followed by optional `[AS] alias`

(&mut self)

Source from the content-addressed store, hash-verified

8390
8391 /// A table name or a parenthesized subquery, followed by optional `[AS] alias`
8392 fn parse_table_factor(&mut self) -> Result<TableFactor<Raw>, ParserError> {
8393 // Guard the nested table-factor recursion. `FROM ((((…` descends
8394 // parse_table_factor -> parse_table_and_joins -> parse_table_factor,
8395 // and the inner `parse_query` recursion guard doesn't stop it because
8396 // the derived-table `maybe_parse` below swallows its
8397 // `RecursionLimitError`. Without this, deeply nested parens overflow
8398 // the stack (and the try-both backtracking balloons memory).
8399 self.checked_recur_mut(|parser| parser.parse_table_factor_inner())
8400 }
8401
8402 fn parse_table_factor_inner(&mut self) -> Result<TableFactor<Raw>, ParserError> {
8403 if self.parse_keyword(LATERAL) {

Callers 1

parse_table_and_joinsMethod · 0.80

Calls 2

checked_recur_mutMethod · 0.80

Tested by

no test coverage detected