Skip to content

chore: test latest sqlparser-rs before release#21960

Draft
andygrove wants to merge 3 commits intoapache:mainfrom
andygrove:chore/bump-sqlparser-main-pin
Draft

chore: test latest sqlparser-rs before release#21960
andygrove wants to merge 3 commits intoapache:mainfrom
andygrove:chore/bump-sqlparser-main-pin

Conversation

@andygrove
Copy link
Copy Markdown
Member

@andygrove andygrove commented Apr 30, 2026

Which issue does this PR close?

N/A

Rationale for this change

Prepare for next sqlparser release by testing here first

What changes are included in this PR?

  • Bump workspace sqlparser from crates.io 0.61.0 to git rev
    9833c033bc44c487b4425272cc8cea80971b5239 (apache/datafusion-sqlparser-rs main).
  • Adapt datafusion-sql and datafusion-expr to upstream AST changes accumulated
    over the ~2 month gap. Where new AST variants/fields are not currently supported,
    the SQL frontend rejects them with not_impl_err! / plan_err! rather than
    silently accepting. Notable areas: Insert::columns: Vec<ObjectName>,
    Lambda::params: OneOrManyWithParens<LambdaFunctionParameter>, new
    SelectItem::ExprWithAliases, BeginTransactionKind::Tran,
    TableConstraint::PrimaryKeyUsingIndex/UniqueUsingIndex, new CreateTable
    fields (snapshot, diststyle, distkey, sortkey, backup,
    with_storage_lifecycle_policy), CreateView::copy_grants,
    Insert/Update/Delete::output, Update::order_by, TableObject::TableQuery,
    WildcardAdditionalOptions::opt_alias, CREATE FUNCTION RETURNS SETOF,
    Parens<Vec<Expr>> around VALUES rows, escape_char: Option<ValueWithSpan>,
    ExcludeSelectItem::Single/Multiple carrying ObjectName.
  • One golden-file update in sqllogictest/test_files/higher_order.slt for an
    upstream error-string change.

Are these changes tested?

Covered by existing tests. cargo test --workspace --exclude datafusion-benchmarks
passes apart from failures pre-existing on main (datafusion-cli insta snapshots,
encrypted_parquet.slt, tracing::test_tracer_injection) which are unrelated to
this bump.

Are there any user-facing changes?

No public API changes. New SQL syntax accepted by upstream sqlparser is rejected
with clear not_impl_err! messages; supporting any of them is follow-on work.

Bump from crates.io 0.61.0 to git main rev 9833c033bc44c... to gain
access to SparkSqlDialect ahead of the next sqlparser-rs release.

Notable upstream changes absorbed:
- Lambda::params is now OneOrManyWithParens<LambdaFunctionParameter>;
  reject typed lambda parameters (not_impl_err) since DataFusion does
  not model parameter data types.
- Insert::columns is now Vec<ObjectName>; reject multi-part column
  names in INSERT (not_impl_err).
- ExcludeSelectItem::Single/Multiple now carry ObjectName; reject
  multi-part EXCLUDE identifiers (plan_err).
- New SelectItem::ExprWithAliases, BeginTransactionKind::Tran,
  TableConstraint::PrimaryKeyUsingIndex/UniqueUsingIndex,
  TableObject::TableQuery variants -> not_impl_err.
- WildcardAdditionalOptions gained opt_alias -> not_impl_err.
- VALUES rows are now Vec<Parens<Vec<Expr>>>; iterate via .content.
- CREATE FUNCTION return_type is now Option<FunctionReturnType>
  (DataType vs SetOf); reject SETOF.
- escape_char in Like/ILike/SimilarTo is now Option<ValueWithSpan>.
- TableAlias gained `at: Option<Ident>`; CreateTable, CreateView,
  Insert, Update, Delete, Select, TableFactor::Function gained
  several new fields with `not_impl_err!` for unsupported ones.

Update higher_order.slt golden error messages to match new
LambdaFunctionParameter Debug formatting.
@github-actions github-actions Bot added sql SQL Planner logical-expr Logical plan and expressions sqllogictest SQL Logic Tests (.slt) labels Apr 30, 2026
@andygrove andygrove changed the title chore: pin sqlparser to apache/datafusion-sqlparser-rs main (9833c033) chore: test latest sqlparser-rs before release Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

1 participant