Show current SQL recursion limit in RecursionLimitExceeded error message#15644
Merged
xudong963 merged 4 commits intoapache:mainfrom Apr 21, 2025
Merged
Conversation
4ed10ff to
93f771e
Compare
comphead
reviewed
Apr 8, 2025
comphead
reviewed
Apr 8, 2025
91da480 to
b1fbfe8
Compare
Contributor
Author
|
@comphead updated the PR after resolving merge conflicts. |
comphead
approved these changes
Apr 18, 2025
Contributor
comphead
left a comment
There was a problem hiding this comment.
thanks @kumarlokesh The code now looks much more aligned.
perhaps we can factor out
self.parser
.parse_statement()
.map(|stmt| Statement::Statement(Box::from(stmt)))
.map_err(|e| match e {
ParserError::RecursionLimitExceeded => {
DataFusionError::SQL(
ParserError::RecursionLimitExceeded,
Some(format!(
" (current limit: {})",
self.options.recursion_limit
)),
)
}
other => DataFusionError::SQL(other, None),
})
into helper method
But it can be done in followup PR
Member
+1 for this to reduce duplicated code |
Contributor
Author
@comphead @xudong963 addressed here dea5fe5. |
xudong963
approved these changes
Apr 21, 2025
Member
xudong963
left a comment
There was a problem hiding this comment.
Thank you @kumarlokesh @comphead
nirnayroy
pushed a commit
to nirnayroy/datafusion
that referenced
this pull request
May 2, 2025
…age (apache#15644) * Show current SQL recursion limit in RecursionLimitExceeded error message * use recursion_limit setting from sql-parser-options * resolve merge conflicts * move error handling code to helper method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
What changes are included in this PR?
recursion_limit(available through SQL parser options) field toDFParserstruct to track the current recursion limit
COPY INTOstatementsSQL error: RecursionLimitExceeded (current limit: {recursion_limit})Are these changes tested?
Are there any user-facing changes?