Skip to content

chore: bump sqlparser from 0.60.0 to 0.62.0#5921

Merged
max-sixty merged 5 commits into
mainfrom
dependabot/cargo/sqlparser-0.62.0
May 19, 2026
Merged

chore: bump sqlparser from 0.60.0 to 0.62.0#5921
max-sixty merged 5 commits into
mainfrom
dependabot/cargo/sqlparser-0.62.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github May 19, 2026

Bumps sqlparser from 0.60.0 to 0.62.0.

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot Bot added dependencies rust Pull requests that update Rust code labels May 19, 2026
Copy link
Copy Markdown
Collaborator

@prql-bot prql-bot left a comment

Choose a reason for hiding this comment

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

CI fails — cargo check/cargo build reports 9 errors in prqlc against sqlparser 0.62 (build-prqlc Windows log). The bump skips 0.61, so several upstream AST changes land at once. Summary so a maintainer can scope the follow-up:

Where Change in 0.61/0.62
prqlc/prqlc/src/sql/gen_projection.rs:222 ExcludeSelectItem::Multiple now takes Vec<ObjectName>, not Vec<Ident>.
prqlc/prqlc/src/sql/gen_query.rs:390, :712 TableFactor::Derived gained a required sample field.
prqlc/prqlc/src/sql/gen_query.rs:643 (default_select) Select gained required optimizer_hints and select_modifiers fields.
prqlc/prqlc/src/sql/gen_query.rs:661 connect_by is now Vec<ConnectByKind>, no longer Option<_>.
prqlc/prqlc/src/sql/gen_query.rs:670, :678 (simple_table_alias, cte_table_alias) TableAlias gained a required at field.
prqlc/prqlc/src/semantic/lowering.rs:1072, prqlc/prqlc/src/sql/gen_query.rs:743 New SelectItem::ExprWithAliases variant — both matches are now non-exhaustive.

The structural additions (sample, at, optimizer_hints, select_modifiers, connect_by) look like mechanical defaults (None / vec![]). The remaining two need a small judgment call:

  • ExcludeSelectItem::Multiple wants ObjectNames — needs wrapping the existing Idents rather than just changing a type.
  • SelectItem::ExprWithAliases (introduced in apache/datafusion-sqlparser-rs#2295, SELECT x AS (a, b)) only comes from parsed SQL — not constructed by prqlc — so both call sites can reasonably reject it as unsupported, matching how lowering.rs:1077 already rejects non-Ident projection exprs.

test-msrv and the cross-binding failures (test-java, test-js, test-python, test-php, test-elixir) look like cascades from the same compile errors — sqlparser 0.62 doesn't declare an MSRV bump (rust-version: unknown on crates.io), so fixing the compile errors should unblock them. Worth re-checking after the fix lands.

Not approving — the version bump on its own won't compile and needs the prqlc-side updates above.

@max-sixty
Copy link
Copy Markdown
Member

@prql-bot Please implement the sqlparser 0.62 migration you scoped in your review and push it to this branch so CI goes green. For the two judgment calls: wrap the existing Idents in ObjectName for ExcludeSelectItem::Multiple, and reject SelectItem::ExprWithAliases as unsupported (matching how lowering.rs already rejects non-Ident projection exprs), as you suggested. Rebase onto the latest main first if the branch is behind.

This was written by Claude Code on behalf of Maximilian Roos

dependabot Bot and others added 2 commits May 19, 2026 16:58
Bumps [sqlparser](https://github.com/apache/datafusion-sqlparser-rs) from 0.60.0 to 0.62.0.
- [Changelog](https://github.com/apache/datafusion-sqlparser-rs/blob/main/CHANGELOG.md)
- [Commits](apache/datafusion-sqlparser-rs@v0.60.0...v0.62.0)

---
updated-dependencies:
- dependency-name: sqlparser
  dependency-version: 0.62.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Wrap excluded `Ident`s in `ObjectName` for the new
`ExcludeSelectItem::Multiple(Vec<ObjectName>)` shape, populate the new
required fields on `Select` (`optimizer_hints`, `select_modifiers`),
`TableFactor::Derived` (`sample`), and `TableAlias` (`at`), switch
`Select::connect_by` from `Option` to `Vec`, and reject the new
`SelectItem::ExprWithAliases` variant — only produced by parsed SQL,
never constructed by prqlc — matching how `lowering.rs` already rejects
non-`Ident` projection exprs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@prql-bot prql-bot force-pushed the dependabot/cargo/sqlparser-0.62.0 branch from 24360d0 to 762a460 Compare May 19, 2026 17:15
Copy link
Copy Markdown
Collaborator

@prql-bot prql-bot left a comment

Choose a reason for hiding this comment

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

Verified the migration against the sqlparser 0.62 source — new Select (optimizer_hints, select_modifiers), TableFactor::Derived (sample), TableAlias (at), and Select::connect_by field/variant shapes all match, and the SelectItem::ExprWithAliases rejection in lowering.rs (reachable via parsed SQL in s-strings) and unreachable! in gen_query.rs (called only on prqlc-constructed projections) are both sound.

One small cleanup: sqlparser provides impl From<Ident> for ObjectName at ast/mod.rs:403, so the manual ObjectName(vec![ObjectNamePart::Identifier(ident)]) block can collapse via .map(ObjectName::from).

Leaving the verdict to CI / a human — this is a self-authored fix on top of a dependabot bump, so no auto-approval from me.

Comment thread prqlc/prqlc/src/sql/gen_projection.rs Outdated
sqlparser 0.62 uses `core::error::Error` (stabilized in Rust 1.81), so
the workspace MSRV must move from 1.75 to 1.81. Also collapse the
single-line closure that rustfmt expects on one line.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@max-sixty
Copy link
Copy Markdown
Member

@prql-bot This is a Dependabot PR with no human author — please don't just re-review, implement the sqlparser 0.62 migration and push a commit to this branch. You already scoped it precisely: apply the 5 mechanical default fields, wrap the Idents in ObjectName for ExcludeSelectItem::Multiple, and add an Err(...) arm for the new SelectItem::ExprWithAliases variant (consistent with how the surrounding code already rejects unsupported projection exprs). Rebase onto the latest main first, then push so CI can go green.

This was written by Claude Code on behalf of Maximilian Roos

prql-bot and others added 2 commits May 19, 2026 18:02
Rust 1.94's clippy enforces `manual_inspect`, which flagged a `.map`
that only side-effects (debug logging) and returns the same value.
Switch to `.inspect` to satisfy the lint with no behavior change.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
sqlparser provides `impl From<Ident> for ObjectName` that constructs
exactly `ObjectName(vec![ObjectNamePart::Identifier(ident)])`, so the
manual wrap can collapse to `.map(ObjectName::from)`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@max-sixty max-sixty merged commit b11de3d into main May 19, 2026
80 of 81 checks passed
@max-sixty max-sixty deleted the dependabot/cargo/sqlparser-0.62.0 branch May 19, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants