Skip to content

fix!: derive mark join output from the selected input - #265

Open
alexandrefimov wants to merge 1 commit into
substrait-io:mainfrom
alexandrefimov:fix/mark-join-output
Open

fix!: derive mark join output from the selected input#265
alexandrefimov wants to merge 1 commit into
substrait-io:mainfrom
alexandrefimov:fix/mark-join-output

Conversation

@alexandrefimov

Copy link
Copy Markdown

LEFT_MARK and RIGHT_MARK currently include both inputs in their inferred schema and output names. Consumers expect only the selected input followed by the marker, so generated plans can fail schema validation.

Match Substrait spec v0.99.0: keep the left input for LEFT_MARK and the right input for RIGHT_MARK, then append a nullable boolean marker. Use that output for names, post-join filters, and emit across logical, lateral, and physical joins.

Join conditions and residual expressions still use both inputs. Keep correlations into that combined scope offset-based, since the mark join output cannot represent it.

Closes #263

BREAKING CHANGE: Mark joins no longer expose columns from the other input. Output field indices change, and post-join filters must use only the selected input and the marker.

`LEFT_MARK` and `RIGHT_MARK` currently include both inputs in their inferred schema and output names. Consumers expect only the selected input followed by the marker, so generated plans can fail schema validation.

Match [Substrait spec v0.99.0](https://github.com/substrait-io/substrait/blob/v0.99.0/site/docs/relations/logical_relations.md#join-operation): keep the left input for `LEFT_MARK` and the right input for `RIGHT_MARK`, then append a nullable boolean marker. Use that output for names, post-join filters, and emit across logical, lateral, and physical joins.

Join conditions and residual expressions still use both inputs. Keep correlations into that combined scope offset-based, since the mark join output cannot represent it.

Closes substrait-io#263

BREAKING CHANGE: Mark joins no longer expose columns from the other input. Output field indices change, and post-join filters must use only the selected input and the marker.
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.

infer_rel_schema emits both inputs plus the mark column for mark joins

1 participant