kumarlokesh commented on code in PR #15644:
URL: https://github.com/apache/datafusion/pull/15644#discussion_r2036043878
##########
datafusion/sql/src/parser.rs:
##########
@@ -469,17 +478,31 @@ impl<'a> DFParser<'a> {
}
_ => {
// use sqlparser-rs parser
- Ok(Statement::Statement(Box::from(
- self.parser.parse_statement()?,
- )))
+ match self.parser.parse_statement() {
+ Ok(stmt) =>
Ok(Statement::Statement(Box::from(stmt))),
+ Err(ParserError::RecursionLimitExceeded) => {
+ Err(ParserError::ParserError(format!(
+ "recursion limit exceeded (current limit:
{})",
+ self.recursion_limit
+ )))
+ }
+ Err(e) => Err(e),
+ }
}
}
}
_ => {
// use the native parser
- Ok(Statement::Statement(Box::from(
- self.parser.parse_statement()?,
- )))
+ match self.parser.parse_statement() {
+ Ok(stmt) => Ok(Statement::Statement(Box::from(stmt))),
Review Comment:
Updated
https://github.com/apache/datafusion/pull/15644/commits/91da4806e96dd47b50543234c98295767dddfe0b
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]