Repository navigation
Expand a joined record type into a Cascades graph - #4741
Merged
Merged
Conversation
g31pranjal
force-pushed
the
apple/g31pranjal/joined-record-type-expansion
branch
from
November 2, 2026 00:01
ba7a7c9 to
a6cc49d
Compare
g31pranjal
marked this pull request as ready for review
November 2, 2026 10:35
normen662
approved these changes
Nov 3, 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.
Implements
SyntheticRecordType.expandforJoinedRecordType, which until now threw. #4626 addedexpandand implemented it forUnnestedRecordType; this does the same for joins.A joined record type expands to one scan per constituent and one equality predicate per join:
left = right, with each side's key expression translated into a value over its own constituent's quantifier. Nested join fields become nested field values.Outer-joined constituents are rejected with
UnsupportedOperationException. An outer join keeps a record that has no partner, and an inner equality between two scans would drop it.This is groundwork: nothing calls
expandyet. It is what lets an index on a joined record type become a match candidate, so that a query performing the same join by hand can be answered from the index.UnnestedRecordTypeExpansionTestis renamed toSyntheticRecordTypeExpansionTest, which now tests the expansion of both kinds of synthetic type. Its test expecting a joined type to throw is replaced by tests of a two-way join, a self-join, a three-way cyclic join (one equality per join), a join whose constituents are named in the opposite order to their declaration, a nested join field, a constituent with no join, and outer-join rejection.