chore: test latest sqlparser-rs before release#21960
Draft
andygrove wants to merge 3 commits intoapache:mainfrom
Draft
chore: test latest sqlparser-rs before release#21960andygrove wants to merge 3 commits intoapache:mainfrom
andygrove wants to merge 3 commits intoapache:mainfrom
Conversation
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.
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?
sqlparserfrom crates.io0.61.0to git rev9833c033bc44c487b4425272cc8cea80971b5239(apache/datafusion-sqlparser-rs main).datafusion-sqlanddatafusion-exprto upstream AST changes accumulatedover 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 thansilently accepting. Notable areas:
Insert::columns: Vec<ObjectName>,Lambda::params: OneOrManyWithParens<LambdaFunctionParameter>, newSelectItem::ExprWithAliases,BeginTransactionKind::Tran,TableConstraint::PrimaryKeyUsingIndex/UniqueUsingIndex, newCreateTablefields (
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/MultiplecarryingObjectName.sqllogictest/test_files/higher_order.sltfor anupstream error-string change.
Are these changes tested?
Covered by existing tests.
cargo test --workspace --exclude datafusion-benchmarkspasses apart from failures pre-existing on main (datafusion-cli insta snapshots,
encrypted_parquet.slt,tracing::test_tracer_injection) which are unrelated tothis 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.