kumarlokesh commented on code in PR #15644:
URL: https://github.com/apache/datafusion/pull/15644#discussion_r2036056433


##########
datafusion/sql/src/parser.rs:
##########
@@ -455,9 +457,16 @@ impl<'a> DFParser<'a> {
                         if let Token::Word(w) = 
self.parser.peek_nth_token(1).token {
                             // use native parser for COPY INTO
                             if w.keyword == Keyword::INTO {
-                                return Ok(Statement::Statement(Box::from(
-                                    self.parser.parse_statement()?,
-                                )));
+                                return 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

Review Comment:
   Updated 
https://github.com/apache/datafusion/pull/15644/commits/91da4806e96dd47b50543234c98295767dddfe0b
   
   I tried to associate `SQLParser` options with `DFParser` struct, instead of 
only keeping a direct mapping between `recursion_limit` and `DFParser`. This 
way `DFParser` would've access to same `recursion_limit` setting that was used 
while building the DFParser.
   
   Thoughts?



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to