fix!: normalize join operands to aliased FROM clause nodes - #1100
Merged
Conversation
domoritz
force-pushed
the
normalize-join-operands
branch
2 times, most recently
from
July 27, 2026 04:56
73d72dd to
8470011
Compare
domoritz
marked this pull request as ready for review
July 27, 2026 05:02
domoritz
force-pushed
the
normalize-join-operands
branch
3 times, most recently
from
July 27, 2026 05:18
a830078 to
a5672e0
Compare
domoritz
force-pushed
the
normalize-join-operands
branch
from
July 27, 2026 05:21
a5672e0 to
a6bc1e6
Compare
domoritz
force-pushed
the
normalize-join-operands
branch
from
July 27, 2026 05:22
a6bc1e6 to
8e8509a
Compare
Add an asFrom coercion that wraps table names and references in a FROM clause aliased by the table name, like Query.from, and use it for join operands. Filter pushdown no longer needs to wrap join operands itself, since every source that can carry an alias now does. Codegen now omits aliases that match the visible table name, so the added aliases do not appear in generated SQL: they serialize only once a transform such as filter pushdown renames the underlying reference. This also drops the redundant alias Query.from previously serialized for schema-qualified table references. Subquery join operands gain the parentheses they previously lacked. BREAKING CHANGE: JoinNode.left and JoinNode.right are typed FromNode instead of FromNode | TableRefNode, and the join builders wrap table name operands in FromClauseNode. Code that inspects join operands as bare TableRefNodes must unwrap the FromClauseNode expr instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
domoritz
force-pushed
the
normalize-join-operands
branch
from
July 27, 2026 15:57
8e8509a to
8ac9d17
Compare
jheer
approved these changes
Jul 30, 2026
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.
Changes the JoinNode to require
FromNodewhich lets us simplify filter pushdown. Not sure what the original use case in #888 was but this simplification/tightening avoids downstream errors as we saw in filter pushdown (#1074). Subquery join operands are now parenthesized, and schema-qualified refs drop a redundant alias that broke full-path qualifiers.Filed #1101 as a follow up related to push down a review with Claude found.