edubraqd opened a new issue, #24913: URL: https://github.com/apache/datafusion/issues/24913
### Describe the bug `exec_and_print` in `datafusion-cli/src/exec.rs` parses statements with `DFParser::parse_sql_with_dialect`, which always uses the parser's built-in recursion limit (50). The session option `datafusion.sql_parser.recursion_limit` is read by `SessionState::sql_to_statement` (via `DFParserBuilder::with_recursion_limit`) but never by the CLI, so changing it has no effect there. ### To Reproduce ```sql > SET datafusion.sql_parser.recursion_limit = 100; > SELECT abs(abs(abs( ... 60 nested calls ... ))); SQL error: RecursionLimitExceeded (current limit: 50) ``` The same statement succeeds through `SessionContext::sql` with that option set. ### Expected behavior The CLI parses with the session's `recursion_limit`, like `SessionState::sql_to_statement`. ### Additional context Noticed while testing deeply nested expressions in `datafusion-cli`. -- 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]
