Skip to content

feat(core)!: bump substrait to v0.103.0 - #1351

Open
nielspardon wants to merge 1 commit into
substrait-io:mainfrom
nielspardon:bump-substrait-v0.103.0
Open

nielspardon wants to merge 1 commit into
substrait-io:mainfrom
nielspardon:bump-substrait-v0.103.0

Conversation

@nielspardon

@nielspardon nielspardon commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Bumps the substrait-packaging artifacts to v0.103.0. The proto change is comment-only; the work is in the dialect schema, which upstream now checks against the protos (substrait-io/substrait#1173).

  • Dialect model: adds TypeKind.FUNC, RelationKind.TOP_N and ExpressionKind.LAMBDA / LAMBDA_INVOCATION, which the schema and its dialects/tests/*_test.yaml fixtures now list. Without them Dialect.load fails on the updated fixtures.
  • ExpandFieldType.CONSTANT_FIELD → CONSISTENT_FIELD: the schema renamed the value to match ExpandRel.ExpandField.consistent_field; CONSTANT_FIELD never named a protobuf member.
  • Extension relations must declare message_types: the schema now requires at least one message type on EXTENSION_SINGLE / EXTENSION_MULTI / EXTENSION_LEAF, so SupportedRelation rejects an extension entry without one via @Value.Check rather than serializing schema-invalid YAML.
  • strpos / logb no longer share a type parameter between their two arguments (substrait-io/substrait#1186), so strpos over varchars of different lengths now resolves; ParameterizedReturnTypeTest used it as its example of an inconsistent binding and now asserts the opposite (lt:any_any still covers the inconsistent case).

Supersedes the v0.103.0 step of dependabot's #1324, which fails on the dialect fixtures; v0.103.1 (#1307) only changes the quantile return type and can follow separately.

Closes #1191

BREAKING CHANGE: ExpandFieldType.CONSTANT_FIELD is renamed to CONSISTENT_FIELD, and building a SupportedRelation for an extension relation without message types now throws IllegalArgumentException.

Track the v0.103.0 dialect schema, which is now checked against the
protos: add TypeKind.FUNC, RelationKind.TOP_N and
ExpressionKind.LAMBDA/LAMBDA_INVOCATION, rename
ExpandFieldType.CONSTANT_FIELD to CONSISTENT_FIELD to match the
ExpandRel protobuf member, and reject an EXTENSION_SINGLE,
EXTENSION_MULTI or EXTENSION_LEAF entry that names no message_types.

strpos and logb no longer share a type parameter between their
arguments, so strpos over varchars of different lengths now resolves.

Closes substrait-io#1191

BREAKING CHANGE: ExpandFieldType.CONSTANT_FIELD is renamed to CONSISTENT_FIELD, and building a SupportedRelation for an extension relation without message types now throws IllegalArgumentException.
@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

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: ec3e6de9-7d80-4613-996b-d2b3dfa994f7

📥 Commits

Reviewing files that changed from the base of the PR and between bc050d3 and 8a96cc9.

📒 Files selected for processing (10)
  • core/src/main/java/io/substrait/dialect/ExpandFieldType.java
  • core/src/main/java/io/substrait/dialect/ExpressionKind.java
  • core/src/main/java/io/substrait/dialect/RelationKind.java
  • core/src/main/java/io/substrait/dialect/SupportedRelation.java
  • core/src/main/java/io/substrait/dialect/TypeKind.java
  • core/src/test/java/io/substrait/dialect/DialectBareStringCollapseTest.java
  • core/src/test/java/io/substrait/dialect/DialectRoundTripTest.java
  • core/src/test/java/io/substrait/dialect/DialectValidationTest.java
  • core/src/test/java/io/substrait/type/ParameterizedReturnTypeTest.java
  • gradle/libs.versions.toml

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

  • New Features
    • Added dialect support for lambda expressions, lambda invocation, function types, and top-N relations.
    • Clarified the expand field type for values that remain the same across expansions.
  • Bug Fixes
    • Improved type resolution when parameters have different string lengths.
    • Extension relations without a message type are now rejected with a clear validation error.

Walkthrough

The dialect adds and renames supported kinds, and extension relation entries now require message types. Tests cover these updates and expect a parameterized strpos call to resolve to R.I64. The substrait-packaging dependency is updated to version 0.103.0.

Changes

Substrait v0.103.0 alignment

Layer / File(s) Summary
Dialect capability declarations and round-trip coverage
core/src/main/java/io/substrait/dialect/ExpandFieldType.java, core/src/main/java/io/substrait/dialect/ExpressionKind.java, core/src/main/java/io/substrait/dialect/RelationKind.java, core/src/main/java/io/substrait/dialect/TypeKind.java, core/src/test/java/io/substrait/dialect/DialectRoundTripTest.java
CONSTANT_FIELD becomes CONSISTENT_FIELD. The dialect enums add LAMBDA, LAMBDA_INVOCATION, TOP_N, and FUNC. The round-trip test adds support for these kinds.
Extension relation message-type validation
core/src/main/java/io/substrait/dialect/SupportedRelation.java, core/src/test/java/io/substrait/dialect/DialectValidationTest.java, core/src/test/java/io/substrait/dialect/DialectBareStringCollapseTest.java
Extension relations require at least one message type. Tests cover rejection when message types are missing and non-bare serialization when a message type is present.
Packaging version and parameterized return-type test
gradle/libs.versions.toml, core/src/test/java/io/substrait/type/ParameterizedReturnTypeTest.java
The packaging dependency changes from 0.102.0 to 0.103.0. The strpos:vchar_vchar test now expects R.I64 for varchar arguments with different lengths.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Merge Risk: ⚪ Minimal · up to 8a96c

No actionable issue remains in the reviewed changes; normal build and test checks are still appropriate before merging.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 8a96c

The inspected changes primarily affect dialect compatibility and configuration validation. No introduced security vulnerability was established. Consumers must accommodate the renamed enum value and mandatory extension message types; downstream integrations and dependency-provided declarations remain incompletely verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated exposure is at the library configuration boundary: a caller supplying dialect configuration can trigger construction rejection or supply message-type strings for serialization. The inspected path does not establish tenant, service, credential, or data-store authority; downstream interpretation remains unverified.

Trust Boundaries and Controls

  • observed — Both textual relation entries and object-form entries reach immutable construction, so configuration loading cannot bypass the new empty-message-list check through either representation. The prior exclusion of extension relations from bare-string serialization is preserved.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 9 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR updates substrait-packaging from 0.102.0 to 0.103.0, as required by issue #1191. It adds FUNC, TOP_N, LAMBDA, and LAMBDA_INVOCATION. It renames CONSTANT_FIELD to `CONSISTENT_FIE…
Out of Scope Changes check ✅ Passed The changed production files implement the v0.103.0 dialect model, validation, and type behavior. The changed tests verify those updates. The version catalog change selects the requested Substrait rel…
Title check ✅ Passed The title is a concise, valid Conventional Commit title. It clearly identifies the core change as a breaking update to Substrait v0.103.0.
Description check ✅ Passed The description explains the rationale, summarizes the dialect and validation changes, identifies breaking changes, and includes a BREAKING CHANGE footer. It satisfies the available template requireme…
Full details: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 9 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

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.103.0

1 participant