-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Upgrade to sqlparser 0.53.0
#13767
base: main
Are you sure you want to change the base?
Upgrade to sqlparser 0.53.0
#13767
Conversation
6dc5055
to
3e521f1
Compare
@@ -200,7 +204,6 @@ impl<S: ContextProvider> SqlToRel<'_, S> { | |||
statement: Statement, | |||
planner_context: &mut PlannerContext, | |||
) -> Result<LogicalPlan> { | |||
let sql = Some(statement.to_string()); |
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.
This change was needed because otherwise tpcds_logical_q64
overflowed its stack
https://github.com/apache/datafusion/actions/runs/12322166828/job/34395679472?pr=13767
thread 'tpcds_logical_q64' has overflowed its stack
fatal runtime error: stack overflow
error: test failed, to rerun pass `-p datafusion --test tpcds_planning`
I traced it down locally and apparently trying to format the deeply nested query was actually overflowing at this spot.
@@ -514,6 +517,35 @@ impl<S: ContextProvider> SqlToRel<'_, S> { | |||
return not_impl_err!("To not supported")?; | |||
} | |||
|
|||
// put the statement back together temporarily to get the SQL |
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.
While this formulation is more code, it does avoid serializing the entire input string on every query, even when it is not needed
@@ -313,7 +313,7 @@ pub enum Expr { | |||
/// plan into physical plan. | |||
Wildcard { | |||
qualifier: Option<TableReference>, | |||
options: WildcardOptions, | |||
options: Box<WildcardOptions>, |
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.
This was needed to avoid a clippy lint about enum variants being too different. Specifically sqlparser added some new fields to WildCardOptions which made them substantially larger
239c18e
to
1e8d072
Compare
Draft until sqlparser is released:
0.53.0
/ sqlparser_derive0.3.0
datafusion-sqlparser-rs#1517Which issue does this PR close?
Rationale for this change
Keep up with dependencies (in this case get access to source spans)
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?