Skip to content

Update parser recursion limit from 50 to 100 - #15622

Closed
Omega359 wants to merge 2 commits into
apache:mainfrom
Omega359:update_recursion_limit
Closed

Update parser recursion limit from 50 to 100#15622
Omega359 wants to merge 2 commits into
apache:mainfrom
Omega359:update_recursion_limit

Conversation

@Omega359

Copy link
Copy Markdown
Contributor

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-actionsgithub-actionsBot 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

@compheadcomphead left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm thanks @Omega359

drop table a;

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

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

@github-actionsgithub-actionsBot added the common Related to common crate label Apr 8, 2025
@comphead

Copy link
Copy Markdown
Contributor

its usually here
image

@comphead
comphead marked this pull request as draft April 8, 2025 20:02
@github-actions

Copy link
Copy Markdown

Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days.

@github-actionsgithub-actionsBot added the Stale PR has not had any activity for some time label Jun 11, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commonRelated to common cratesqlSQL PlannersqllogictestSQL Logic Tests (.slt)StalePR has not had any activity for some time

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update recursion limit in DataFusion

3 participants

@Omega359@comphead@berkaysynnada