Skip to content

fix: add missing RelCommon field to UpdateRel - #1168

Open
nielspardon wants to merge 1 commit into
substrait-io:mainfrom
nielspardon:fix/updaterel-relcommon
Open

fix: add missing RelCommon field to UpdateRel#1168
nielspardon wants to merge 1 commit into
substrait-io:mainfrom
nielspardon:fix/updaterel-relcommon

Conversation

@nielspardon

@nielspardon nielspardon commented Aug 7, 2026

Copy link
Copy Markdown
Member

UpdateRel is the last relation in the Rel oneof without a RelCommon common field. Every other relation carries one, including the closely related WriteRel (field 7) and DdlRel (field 8), which had theirs added for the same reason in #591.

Without it, an UpdateRel cannot carry an emit, hints, or a rel_anchor, so consumers have no way to apply the common per-relation functionality they support everywhere else. UpdateRel does produce output — the modified records, per the Update Operator docs — so emit is meaningful here.

This adds RelCommon common = 6;, mirroring the placement WriteRel and DdlRel use: after the last data field and before the nested type declarations. Field 6 was previously unused, so the change is purely additive and plans that do not set the field are unaffected. As documented on RelCommon, an absent RelCommon means Direct output, which preserves today's behavior. This is not a breaking change.

ReferenceRel is the only other message ending in Rel without a RelCommon, and is deliberately left alone here: it is a pointer to another subtree rather than an operator with its own output, so the common fields do not carry the same meaning.

Closes #821

🤖 Generated with AI


This change is Reviewable

UpdateRel is the last relation in the `Rel` oneof without a `RelCommon
common` field. Every other relation carries one, including the closely
related WriteRel (field 7) and DdlRel (field 8), which had theirs added
for the same reason in substrait-io#591.

Without it, an UpdateRel cannot carry an emit, hints, or a rel_anchor,
so consumers have no way to apply the common per-relation functionality
they support everywhere else. UpdateRel does produce output (the modified
records), so emit is meaningful here.

Add `RelCommon common = 6;`, mirroring the placement WriteRel and DdlRel
use: after the last data field and before the nested type declarations.
Field 6 was previously unused, so this is purely additive and plans that
do not set the field are unaffected. As documented on RelCommon, an
absent RelCommon means Direct output, which preserves today's behavior.

Closes substrait-io#821
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.

UpdateRel is missing RelCommon

1 participant