MCPcopy Create free account
hub / github.com/apache/datafusion / parse_into_expr

Method parse_into_expr

datafusion/sql/src/parser.rs:603–607  ·  view source on GitHub ↗

Parses the entire SQL string into an expression. In contrast to [`DFParser::parse_expr`], this function will report an error if the input contains any trailing, unparsed tokens.

(&mut self)

Source from the content-addressed store, hash-verified

601 /// In contrast to [`DFParser::parse_expr`], this function will report an error if the input
602 /// contains any trailing, unparsed tokens.
603 pub fn parse_into_expr(&mut self) -> Result<ExprWithAlias, DataFusionError> {
604 let expr = self.parse_expr()?;
605 self.expect_token("end of expression", &Token::EOF)?;
606 Ok(expr)
607 }
608
609 /// Helper method to parse a statement and handle errors consistently, especially for recursion limits
610 fn parse_and_handle_statement(&mut self) -> Result<Statement, DataFusionError> {

Callers 3

parse_sql_into_exprMethod · 0.80

Calls 2

parse_exprMethod · 0.80
expect_tokenMethod · 0.80

Tested by

no test coverage detected