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

Method parse_nullif_expr

src/sql-parser/src/parser.rs:1047–1054  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1045 }
1046
1047 fn parse_nullif_expr(&mut self) -> Result<Expr<Raw>, ParserError> {
1048 self.expect_token(&Token::LParen)?;
1049 let l_expr = Box::new(self.parse_expr()?);
1050 self.expect_token(&Token::Comma)?;
1051 let r_expr = Box::new(self.parse_expr()?);
1052 self.expect_token(&Token::RParen)?;
1053 Ok(Expr::NullIf { l_expr, r_expr })
1054 }
1055
1056 // Parse calls to extract(), which can take the form:
1057 // - extract(field from 'interval')

Callers 1

parse_prefixMethod · 0.80

Calls 2

expect_tokenMethod · 0.80
parse_exprMethod · 0.80

Tested by

no test coverage detected