Skip to content

feat(core)!: bump substrait to v0.104.0 - #1404

Merged
nielspardon merged 2 commits into
substrait-io:mainfrom
nielspardon:feat/substrait-v0.104.0
Oct 13, 2026
Merged

nielspardon merged 2 commits into
substrait-io:mainfrom
nielspardon:feat/substrait-v0.104.0

Conversation

@nielspardon

Copy link
Copy Markdown
Member

Bumps the substrait-packaging artifacts to v0.104.0, which fixes two parse rules in the type-expression grammar (substrait-io/substrait#1228): ! now binds tighter than every binary operator instead of looser than AND / OR, and the ? : conditional associates to the right. The labeled alternatives of the generated parser are unchanged, so ParseToPojo needs no change; the new behavior arrives with the antlr artifact.

ReturnProgramTypeTest pinned the old ! binding (!(L < 5) AND L < 0 read as !((L < 5) AND (L < 0))) and now asserts the new one. TestTypeParser gains precedence cases for ! and both conditional forms, taken from the spec's new precedence table.

The other v0.104.0 changes (window function test-case format, test-case cleanups, site fixes) touch nothing this repo consumes.

Closes #1323

BREAKING CHANGE: return type expressions in extension YAMLs are parsed with ! binding tighter than AND and OR, and with ? : grouping to the right, which changes the result of user-defined expressions that relied on the previous binding.

Spec v0.104.0 fixes two parse rules in the type-expression grammar:
`!` now binds tighter than every binary operator instead of looser than
`AND` / `OR`, and the `? :` conditional associates to the right. The
generated parser's visitor contexts are unchanged, so `ParseToPojo`
needs no change; the new behavior arrives with the `antlr` artifact.

`ReturnProgramTypeTest` pinned the old `!` binding and now asserts the
new one. `TestTypeParser` gains precedence cases for `!` and both
conditional forms, mirroring the spec's precedence table.

Closes substrait-io#1323

BREAKING CHANGE: return type expressions in extension YAMLs are parsed with `!` binding tighter than `AND` and `OR`, and with `? :` grouping to the right, which changes the result of user-defined expressions that relied on the previous binding.
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: substrait-io/substrait-java/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 452fe286-96c7-465e-ba6c-ab000ce13763
📥 Commits

Reviewing files that changed from the base of the PR and between 15533c7 and a49d98f.

📒 Files selected for processing (2)
  • core/src/test/java/io/substrait/type/ReturnProgramTypeTest.java
  • core/src/test/java/io/substrait/type/parser/TestTypeParser.java

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Updated expression parsing to follow v0.104.0 precedence rules: unary ! binds more tightly than binary operators, conditional expressions associate from right to left, and if then else binds more tightly than ?:.
    • Corrected conditional type selection: expressions using the selected branch now resolve to varChar(2) when that branch has this type. These changes align parsed expressions and their resulting types with the updated precedence behavior.

The version catalog now uses Substrait 0.104.0. Parser tests cover unary negation precedence and conditional associativity. A return-type test expects the result produced by the updated precedence rules.

Changes: Return Type Expression Precedence

Layer / File(s) Summary
Align precedence tests with Substrait 0.104.0
gradle/libs.versions.toml, core/src/test/java/io/substrait/type/parser/TestTypeParser.java, core/src/test/java/io/substrait/type/ReturnProgramTypeTest.java
The version catalog changes substrait-packaging to 0.104.0. Parser tests cover precedence and associativity for !, ?:, and if then else; the test renderer handles NotOperation and IfOperation. The return-type test expects a varchar length of 2 for the negation-and-AND expression.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: alexandrefimov

Merge Risk: ⚪ Minimal · up to a49d9

The parser upgrade and its precedence tests are aligned; no actionable merge-blocking risk remains in the reviewed changes.

Pre-merge checks · Passed 4 · Failed 1

Failed Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title is concise, uses valid Conventional Commit syntax, and accurately identifies the breaking upgrade to Substrait v0.104.0.
Description check Passed The description explains the rationale, parser behavior changes, affected tests, scope, breaking impact, and linked issue. It includes the required BREAKING CHANGE footer.
Linked Issues check Passed Issue #1323 requests the Substrait v0.104.0 update. gradle/libs.versions.toml changes substrait-packaging from 0.103.1 to 0.104.0. The aliases for substrait-antlr, substrait-extensions, an…
Out of Scope Changes check Passed The changes update the consumed Substrait artifact version and add or update tests for the grammar behavior introduced by v0.104.0. The test helper changes support those tests. No unrelated repository…
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nielspardon
nielspardon merged commit 1948a86 into substrait-io:main Oct 13, 2026
13 checks passed
@nielspardon
nielspardon deleted the feat/substrait-v0.104.0 branch October 13, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update to Substrait v0.104.0

2 participants