[chore] Sync upstream apache/datafusion-sqlparser-rs into sigma fork#47
Open
ayman-sigma wants to merge 122 commits intomainfrom
Open
[chore] Sync upstream apache/datafusion-sqlparser-rs into sigma fork#47ayman-sigma wants to merge 122 commits intomainfrom
ayman-sigma wants to merge 122 commits intomainfrom
Conversation
Co-authored-by: Ifeanyi Ubah <ify1992@yahoo.com>
Co-authored-by: Ifeanyi Ubah <ify1992@yahoo.com>
…k being silently ignored (apache#2129)
Co-authored-by: Ifeanyi Ubah <ify1992@yahoo.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Ifeanyi Ubah <ify1992@yahoo.com>
…ed names (apache#2244) Co-authored-by: Yoav Cohen <59807311+yoavcloud@users.noreply.github.com>
…2228) Signed-off-by: Guan-Ming Chiu <guanmingchiu@gmail.com> Signed-off-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com> Co-authored-by: Ifeanyi Ubah <ifeanyi@validio.io>
Co-authored-by: Ifeanyi Ubah <ify1992@yahoo.com>
# Conflicts: # src/ast/mod.rs # src/ast/spans.rs # src/lib.rs # src/parser/mod.rs # tests/sqlparser_snowflake.rs
- Add missing `pos` field to State initializer in tokenizer hint parsing - Remove spurious `sample` reference that leaked into PassThroughQuery Display - Add `sample` AfterTableAlias check back to Derived Display - Add missing doc comments to sigma types (InExpr, PassThroughQuery, TokenWithRange) required by upstream's new #![forbid(missing_docs)] - Remove unfulfilled #![expect(clippy::unnecessary_unwrap)] from lib.rs - Add has_colon: true to JsonPath initializers in Snowflake-style colon-path tests - Update Databricks a:['b'] test to use new ColonBracket AST node (upstream change) - Exclude DatabricksDialect from parse_array_subscript test since Databricks uses `:` for JSON paths, conflicting with array slice syntax arr[1:2] Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ayman-sigma
commented
Apr 7, 2026
| has_colon: false, | ||
| path: vec![ | ||
| JsonPathElem::Bracket { | ||
| JsonPathElem::ColonBracket { |
Author
There was a problem hiding this comment.
@deifactor to confirm the impact of this change. It seems they supported the colon case using this ColonBracket. Do we need to change stuff on our side for that?
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.
The changes are done by Claude Code. The important commits to review are the last 2 commits.
Summary
Syncs the sigmacomputing fork with the latest upstream
apache/datafusion-sqlparser-rsmain branch (HEAD913cf0e7), bringing in all changes since v0.60.0 (120 upstream commits).Approach: New branch created off
upstream/mainHEAD, thenorigin/main(sigma's changes) merged in. This preserves the full upstream commit history as primary ancestry.Upstream changes included
v0.61.0 release (66 commits from 22 contributors) — highlights:
make_word()keyword lookupALTER OPERATOR,ALTER OPERATOR CLASS/FAMILY,DROP OPERATOR(PostgreSQL)CREATE/ALTER/DROP POLICY(PostgreSQL)Q'...'), MERGE predicates, hierarchical queries (CONNECT BY)TIMESTAMP/VERSION AS OF,OPTIMIZE TABLE&&as boolean AND,SELECTmodifiers,CAST(... AS ... ARRAY)BEGIN...END, IF/ELSE without semicolonsTRUNCATE IF EXISTSPARTITION OF, force row-level security,ANALYZEwith optional table/column/* ... */), pipe operator|>fixes, tokenizer custom mapper supportcore::error::Errorimpl forParserErrorandTokenizerErrordialect_of!macro checks with trait methods3 unreleased commits beyond v0.61.0:
913cf0e7Enable!as NOT operator for Databricks dialect (Enable!as NOT operator for Databricks dialect apache/datafusion-sqlparser-rs#2287)6f8e7b85Expose values through ValueWithSpan (Expose values through ValueWithSpan apache/datafusion-sqlparser-rs#2281)df0d56cfFix tokenization of<edge cases (Fix the tokenization of<edge cases apache/datafusion-sqlparser-rs#2280)Sigma-specific features preserved
All sigma custom features have been carried through the merge:
PassThroughQuerytable factor — pass-through SQL strings that skip parsingToken::Mustacheandtokenize_with_range()— Mustache template tokenization with byte-offset rangesExpr::InExpr— parameter substitution hack for[ NOT ] IN <expr>has_colonfield onJsonPath,AllElementsvariant,get_next_precedence()for:supports_string_literal_backslash_escape()→truesupports_nested_comments()→truesupports_semi_structured_array_all_elements()— Databricks[*]syntaxConflict resolutions
Conflicts arose in 5 files and were resolved preserving both sides:
src/ast/mod.rsAllElementsvariant,has_colonfield,InExprexprColonBracketvariant, extensive new DDL exportssrc/ast/spans.rsInExprspan handlerAllElements/ColonBracketspan handlerssrc/lib.rs#![expect(clippy::unnecessary_unwrap)]#![forbid(clippy::unreachable)],#![forbid(missing_docs)]src/parser/mod.rshas_colontracking,InExpr/PassThroughQueryparsingColonBrackethandling inparse_json_pathtests/sqlparser_snowflake.rsPost-merge compilation fixes:
pos: 0toStateinitializer in tokenizer hint parsing (sigma'sposfield not initialized in upstream's new code path)PassThroughQueryDisplay impl wheresamplecode fromDerivedleaked in during mergeInExpr,PassThroughQuery,TokenWithRange) required by upstream's new#![forbid(missing_docs)]JsonPathtest initializers to includehas_colon: truefor Snowflake colon-path testsa:['b']test to use newColonBracketAST node (upstream refined the representation; display output is identical)DatabricksDialectfromparse_array_subscripttest — Databricks uses:for JSON paths, conflicting with array slice syntaxarr[1:2]Test plan
cargo clippy --all-features --all-targets— cleancargo fmt— no changescargo test --all-features --all-targets— all 21 test suites pass (0 failures)🤖 Generated with Claude Code