Skip to content

Update parser recursion limit from 50 to 100 #15622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Omega359
Copy link
Contributor

@Omega359 Omega359 commented Apr 7, 2025

Which issue does this PR close?

Rationale for this change

A number of valid tests are failing because the recursion limit is fairly low. See #14091

What changes are included in this PR?

Updated the default recursion limit from 50 to 100.

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

@github-actions github-actions bot added sql SQL Planner sqllogictest SQL Logic Tests (.slt) labels Apr 7, 2025
@Omega359 Omega359 marked this pull request as ready for review April 7, 2025 16:12
Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thanks @Omega359

@@ -185,3 +185,17 @@ select ammp from a;

statement ok
drop table a;

# Error number of nested expressions exceeds limit
statement error DataFusion error: SQL error: RecursionLimitExceeded
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the error looks like

sql parser error: recursion limit exceeded

It is is good to provide a current recursion limit value as long as it is can be configured through datafusion.sql_parser.recursion_limit parameter

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need 2 tests to guard the current default value, for both increments(error expecting test wouldn't give an error) and decrements(success expecting test would fail)

@Omega359
Copy link
Contributor Author

Omega359 commented Apr 8, 2025

This PR is incomplete, I discovered that I didn't update the config to reflect the change. Once that change was made the sqllogictests started with a stack overflow. So the change that @alamb thought would help with that doesn't seem to have had the desired results.

@Omega359
Copy link
Contributor Author

Omega359 commented Apr 8, 2025

For some reason I can't switch this to draft, can a committer do that for me please?

@github-actions github-actions bot added the common Related to common crate label Apr 8, 2025
@comphead
Copy link
Contributor

comphead commented Apr 8, 2025

its usually here
image

@comphead comphead marked this pull request as draft April 8, 2025 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Related to common crate sql SQL Planner sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update recursion limit in DataFusion
3 participants