Fix merging left_joins to maintain its own join_type context#36120
Merged
kamipo merged 1 commit intorails:masterfrom Apr 27, 2019
Merged
Fix merging left_joins to maintain its own join_type context#36120kamipo merged 1 commit intorails:masterfrom
join_type context#36120kamipo merged 1 commit intorails:masterfrom
Conversation
This fixes a regression for rails#35864. Usually, stashed joins (mainly eager loading) are performed as LEFT JOINs. But the case of merging joins/left_joins of different class, that (stashed) joins are performed as the same `join_type` as the parent context for now. Since rails#35864, both (joins/left_joins) stashed joins might be contained in `joins_values`, so each stashed joins should maintain its own `join_type` context. Fixes rails#36103.
kamipo
added a commit
that referenced
this pull request
Apr 27, 2019
Fix merging left_joins to maintain its own `join_type` context
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.
This fixes a regression for #35864.
Usually, stashed joins (mainly eager loading) are performed as LEFT
JOINs.
But the case of merging joins/left_joins of different class, that
(stashed) joins are performed as the same
join_typeas the parentcontext for now.
Since #35864, both (joins/left_joins) stashed joins might be contained
in
joins_values, so each stashed joins should maintain its ownjoin_typecontext.Fixes #36103.