Skip to content

Rebase vendored Substrait proto from v0.23.0 to 0.98.0 #12597

Description

@nielspardon

Background

Gluten vendors its Substrait .proto files (gluten-substrait/src/main/resources/substrait/proto/substrait/) pinned near Substrait v0.23.0 with local patches, while upstream Substrait is now at 0.98.0. The JVM plan producer and both native consumers (Velox, ClickHouse) regenerate from this single proto source and ship together, and Gluten's Substrait plans are transient (built per query, serialized across JNI, discarded) — so there is no wire-compatibility constraint and the rebase is a pure code migration.

Goal

Bring the vendored proto to official 0.98.0 core (verbatim) plus Gluten's genuinely engine-specific additions grafted at non-colliding numbers, migrating the JVM producer and both native backends in lockstep.

Approach

Land as small, independently-green PRs, one per message family (each keeps protoc + JVM + both native builds compiling). Minimal rebase first — relocate only colliding fork fields and drop dead/decided-drop items; extracting engine-specific forks to formal Substrait extensions is deferred to a follow-up.

Increments

One PR per message family; each keeps protoc + JVM + both native builds green. Progress: 3 merged · 6 in review · 1 draft · 2 to do · 1 resolved upstream.

Upstream Substrait convergence PRs

Some kept forks converge by landing the equivalent field/type in Substrait core (substrait-io/substrait) rather than by dropping the fork. These are tracked under the apache-gluten label:

  • substrait-io/substrait#1167advanced_extension on ExpandRel — merged, ships 0.100.0 → drives increment 5c; Gluten's graft already matches verbatim
  • substrait-io/substrait#1147 — core Type.Null for untyped nulls — open → increment 2 relocates Type.Nothing to kind 40 to match; converge by renaming NothingNull once released (see note below)
  • substrait-io/substrait#1138 — JSON read options on ReadRel.LocalFiles — open → upstreams Gluten's json read-options fork; increment 7 keeps the vendored json = 15 until this merges
  • substrait-io/substrait#1139 — partition fields on ReadRel.LocalFiles — open → upstreams Gluten's partition-columns fork; the field-16 collision with the iceberg fork is a post-merge concern
  • substrait-io/substrait#1140 — docs on typing untyped nulls — closed, superseded by substrait-io/substrait#1147

Tracked for later extraction waves (not driving a rebase increment):

Note on Type.Nothing

Following the Substrait community sync (2026-07-29), the earlier plan to drop the Type.Nothing fork is superseded: upstream is adding a dedicated core null type (substrait-io/substrait#1147Type.Null at kind field 40). Increment 2 relocates Nothing to field 40 to match, so once that PR releases the fork converges by renaming the message NothingNull — no field renumbering, no consumer-mapping changes. Gluten keeps Type.Nothing until then.

Related: upstream consolidation work is tracked under the apache-gluten label in substrait-io/substrait.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions