Skip to content
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

chore(deps): Update sqlparser to 0.54.0 #14255

Merged
merged 9 commits into from
Feb 5, 2025

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Jan 23, 2025

Which issue does this PR close?

Rationale for this change

Keep up with latest SQL parser dependencies

What changes are included in this PR?

  1. Update to sqlparser to latest released
  2. Update DataFusion to use the latest APIs

Are these changes tested?

Yes by CI

Are there any user-facing changes?

@github-actions github-actions bot added sql SQL Planner logical-expr Logical plan and expressions sqllogictest SQL Logic Tests (.slt) common Related to common crate labels Jan 23, 2025
query ?
select interval '5' years
----
5.000000000 secs

60 mons
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this certainly seems much more correct to me -- I also removed the now out of date comment.

@@ -984,84 +984,141 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
Ok(Expr::Cast(Cast::new(Box::new(expr), dt)))
}

fn sql_subscript_to_expr(
fn sql_compound_field_access_to_expr(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The code to plan CompoundFieldAccess is directly copy/pasted from @goldmedal 's PR

@alamb alamb changed the title chore(deps): Update sqlparser to 0.54.0 @alamb chore(deps): Update sqlparser to 0.54.0 Jan 24, 2025
@alamb alamb marked this pull request as draft January 24, 2025 08:23
@alamb alamb marked this pull request as ready for review January 27, 2025 17:55
///
/// For example, `foo.bar` would be represented as a two element vector
/// `["foo", "bar"]`
fn from_idents(mut idents: Vec<String>) -> Option<Self> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed the signature to be easier to work with (pass the vec by ownership rather than &mut)

datafusion/common/src/column.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@goldmedal goldmedal left a comment

Choose a reason for hiding this comment

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

Thanks @alamb. Overall look good to me 👍

datafusion/sql/src/planner.rs Outdated Show resolved Hide resolved
Comment on lines +2626 to +2628
# left_join_using_qualified (snowflake syntax)
query error DataFusion error: This feature is not implemented: Invalid identifier in USING clause\. Expected single identifier, got t2\.c2
SELECT t1.c1, t2.c2 FROM test_partition_table t1 JOIN test_partition_table t2 USING (t2.c2) ORDER BY t2.c2;
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@goldmedal
Copy link
Contributor

@alamb There are some conflicts here.

@alamb
Copy link
Contributor Author

alamb commented Feb 5, 2025

@alamb There are some conflicts here.

Thank you for the review @goldmedal -- I have merged up and resolved the conflicts

@goldmedal goldmedal merged commit 304488d into apache:main Feb 5, 2025
27 checks passed
@goldmedal
Copy link
Contributor

🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Related to common crate logical-expr Logical plan and expressions sql SQL Planner sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants