Remove unused nullable flag from tree-walker context#14
Merged
Conversation
The Context.nullable flag was written in two places (the root context and the forEach inner context) but never read. repeat hardcodes INNER JOIN and forEach selects its apply type from the node's own isOrNull, so the flag drove nothing. It read like a switch that should select outer joins, which misled the PR #9 review into proposing a change that would have resurrected rows the specification eliminates. The current row-dropping behaviour is conformant: the reference implementation collapses a forEachOrNull null row when a nested row-generating operator yields nothing (row_product semantics). The full conformance suite passes unchanged after the removal. Refs #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the
Context.nullableflag from the tree-walker. It was written but never read, so it drove no behaviour -repeathardcodesINNER JOINandforEachpicks its apply type from the node's ownisOrNull. It read like a switch that should preserveforEachOrNullnull rows, which is what prompted the PR #9 review suggestion to consume it; investigating that (#10) showed the current row-dropping behaviour is already conformant, so consuming the flag would have been a regression. Also drops the now-redundantisOrNullparameter and stale comments.No generated SQL changes. The full conformance suite passes unchanged (144/144) and build, lint, and format:check are clean.
Refs #10