You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "edubraqd (via GitHub)" <gi...@apache.org> on 2026/09/03 04:54:57 UTC
[I] `datafusion-cli` ignores `datafusion.sql_parser.recursion_limit` [datafusion]
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: github-unsubscribe@datafusion.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] `datafusion-cli` ignores `datafusion.sql_parser.recursion_limit` [datafusion]
Posted by "KassaSana (via GitHub)" <gi...@apache.org>.
KassaSana commented on issue #24913:
URL: https://github.com/apache/datafusion/issues/24913#issuecomment-5856826092
take
--
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-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] `datafusion-cli` ignores `datafusion.sql_parser.recursion_limit` [datafusion]
Posted by "KassaSana (via GitHub)" <gi...@apache.org>.
KassaSana commented on issue #24913:
URL: https://github.com/apache/datafusion/issues/24913#issuecomment-5856826373
I reproduced this on current `main`. The configured recursion limit is ignored in `-c`, `-f`, env-based config, and the interactive shell.
The fix appears to need both:
* `exec_and_print` in `exec.rs`
* `CliHelper::validate_input` in `helper.rs`
The earlier attempt in #24914 handled the execution path but not the REPL validation path.
My plan is to use `DFParserBuilder::with_recursion_limit` for execution and keep the recursion limit in `CliHelper` synchronized similarly to the existing dialect handling, with tests for both paths.
Would you prefer a narrow `set_recursion_limit` method, or a broader parser-options setter?
--
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-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org