Skip to content

feat(core)!: update to Substrait v0.109.0 - #1467

Draft
Adam-Alani wants to merge 5 commits into
substrait-io:mainfrom
Adam-Alani:adam.alani/substrait-v0.109.0
Draft

Adam-Alani wants to merge 5 commits into
substrait-io:mainfrom
Adam-Alani:adam.alani/substrait-v0.109.0

Conversation

@Adam-Alani

Copy link
Copy Markdown
Contributor

Why

Substrait v0.109.0 is the release that adds table functions, and it also tightens UUID literals: a UUID value must be exactly 16 bytes in network byte order. Java already encoded and decoded UUIDs big-endian, but decoding read the first 16 bytes of a longer value and failed with a BufferUnderflowException on a shorter one.

What

The build takes its spec inputs (protobuf, ANTLR grammar, extension YAMLs and dialect schema) from v0.109.0. Converting a UUID literal whose bytes are not exactly 16 long now throws an IllegalArgumentException. The release's new functions_table.yaml declares only table functions, which the extension model cannot read yet, so the default catalog leaves it out until they are modeled.

How

ExpressionCreator.uuid checks the length before decoding. New tests check the spec's byte-order vectors and the rejection of 0-, 15- and 17-byte values, and the generic round-trip fixture now generates 16-byte UUIDs.

BREAKING CHANGE: converting a UUID literal whose bytes are not exactly 16 long now throws IllegalArgumentException instead of decoding the first 16 bytes.

alexandrefimov and others added 5 commits November 11, 2026 05:50
Apply the read filter before selecting columns, and apply emit to the projected schema. Preserve the field order of the mask on named tables, virtual tables and local files.

BREAKING CHANGE: Spark now applies whole-column read masks in selection order and rejects unsupported nested read masks.
Read and write detached relations without losing opaque references. Accept named-lambda capability declarations and report unsupported plan definitions. Supply the execution timezone for calendar arithmetic on zoned timestamps and match each overload against its argument count.

BREAKING CHANGE: Replace the removed subtract:ptstz_iyear overload with subtract:ptstz_iyear_str and supply an IANA timezone or the current_timezone expression.
The datetime mapper runs before default matching. It claimed year/month arithmetic on a zoned
timestamp even when another extension declares the two operands, and replaced that call with the
standard three-argument function.

The mapper now leaves a call to default matching when a declaration matches the operand types
exactly. In the other direction, a standard call keeps its current_timezone argument when the two
remaining operands would convert to that declaration.
… operands

The check that decides whether an aggregate needs a carried binding took the first declaration with
a matching signature. Conversion from Calcite prefers a later declaration when the first one does
not bind the operands. The check now applies the same operand test, so the binding stays in that
case.
Spec v0.109.0 requires a UUID literal to be exactly 16 bytes in network
byte order. Java already encoded and decoded big-endian, but decoding
read the first 16 bytes of a longer value and failed with a
BufferUnderflowException on a shorter one. It now rejects any other
length with an IllegalArgumentException.

The release also adds table functions, whose functions_table.yaml the
extension model cannot read yet, so the default catalog leaves it out
until they are modeled.

BREAKING CHANGE: converting a UUID literal whose bytes are not exactly
16 long now throws IllegalArgumentException instead of decoding the
first 16 bytes.
@coderabbitai

coderabbitai Bot commented Nov 26, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • 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

@Adam-Alani

Copy link
Copy Markdown
Contributor Author

This builds on #1453 (Substrait v0.108.0), which hasn't merged yet, so the diff also shows its commits. Only ebcba60 is new here. I'll rebase onto main once #1453 lands.

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.

3 participants