Skip to content

Test upgrade to sqlparser-rs 0.54 - #14198

Closed
alamb wants to merge 2 commits into
apache:mainfrom
alamb:alamb/sqlparser_upgrade_test
Closed

Test upgrade to sqlparser-rs 0.54#14198
alamb wants to merge 2 commits into
apache:mainfrom
alamb:alamb/sqlparser_upgrade_test

Conversation

@alamb

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

I want to test the upgrade to the latest sqlparser before we release a new version of sqlparser as a sanity check / test downstream implications

What changes are included in this PR?

  1. pin to pre-release version of sqlparser
  2. Update Planning for new APIs

Are these changes tested?

Are there any user-facing changes?

@github-actionsgithub-actionsBot added sql SQL Planner logical-expr Logical plan and expressions labels Jan 19, 2025
@github-actionsgithub-actionsBot added the sqllogictest SQL Logic Tests (.slt) label Jan 19, 2025
@alamb
alambforce-pushed the alamb/sqlparser_upgrade_test branch from 98938a9 to 8632bddCompareJanuary 19, 2025 14:27
@github-actionsgithub-actionsBot added the common Related to common crate label Jan 19, 2025
SQLExpr::Subscript { expr, subscript } => {
self.sql_subscript_to_expr(*expr, subscript, schema, planner_context)
}
SQLExpr::CompoundFieldAccess { root, access_chain } => self

Copy link
Copy Markdown
ContributorAuthor

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

select interval '5' years
----
5.000000000 secs
60 mons

Copy link
Copy Markdown
ContributorAuthor

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.

@alamb
alambforce-pushed the alamb/sqlparser_upgrade_test branch from 8632bdd to 5bb20adCompareJanuary 19, 2025 15:12
///
/// For example, `foo.bar` would be represented as a two element vector
/// `["foo", "bar"]`
pub fn from_idents(mut idents: Vec<String>) -> Option<Self> {

@alambalambJan 19, 2025

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

i made this public and cleaned up the signature so I could reuse it when dealing with the changes to USING planning

However I am not quite sure what a USING(foo.bar) would actually mean 🤔 Maybe when joining across multiple schemas...

I could also revert this change and just make the planner error if it got a multi-part ObjectName in a USING clause ..

@alamb

Copy link
Copy Markdown
ContributorAuthor

Superceded by #14255

@alambalamb closed this Jan 23, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commonRelated to common cratelogical-exprLogical plan and expressionssqlSQL PlannersqllogictestSQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@alamb