-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Show current SQL recursion limit in RecursionLimitExceeded error message #15644
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
Show current SQL recursion limit in RecursionLimitExceeded error message #15644
Conversation
4ed10ff
to
93f771e
Compare
91da480
to
b1fbfe8
Compare
@comphead updated the PR after resolving merge conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
+1 for this to reduce duplicated code |
@comphead @xudong963 addressed here dea5fe5. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @kumarlokesh @comphead
…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
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 toDFParser
struct to track the current recursion limit
COPY INTO
statementsSQL error: RecursionLimitExceeded (current limit: {recursion_limit})
Are these changes tested?
Are there any user-facing changes?