comphead commented on code in PR #15644: URL: https://github.com/apache/datafusion/pull/15644#discussion_r2034065262
########## 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: wondering, can we take it from config? -- 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