Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stash left_joins into joins to deduplicate redundant LEFT JOIN #35864

Merged
merged 1 commit into from
Apr 4, 2019

Commits on Apr 4, 2019

  1. Stash left_joins into joins to deduplicate redundant LEFT JOIN

    Originally the `JoinDependency` has the deduplication for eager loading
    (LEFT JOIN). This re-uses that deduplication for `left_joins`.
    
    And also, This makes left join order into part of joins, i.e.:
    
    Before:
    
    ```
    association joins -> stash joins (eager loading, etc) -> string joins -> left joins
    ```
    
    After:
    
    ```
    association joins -> stash joins (eager loading, left joins, etc) -> string joins
    ```
    
    Now string joins are able to refer left joins.
    
    Fixes rails#34325.
    Fixes rails#34332.
    Fixes rails#34536.
    kamipo committed Apr 4, 2019
    Configuration menu
    Copy the full SHA
    8f05035 View commit details
    Browse the repository at this point in the history