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

[release/6.0] Fix to #27072 - Suboptimal SQL generation for query with optional navigation, its collection navigation and lateral join #27302

Merged
merged 1 commit into from
Feb 2, 2022

Commits on Jan 28, 2022

  1. Fix to #27072 - Suboptimal SQL generation for query with optional nav…

    …igation, its collection navigation and lateral join
    
    When expanding collection navigation we added a check to filter out rows for which parent value is null and only afterwards match inner and outer keys. This could happen when chaining collection navigation after optional reference. Problem was that during translation we try to convert the collection subquery to a join and if that succeeds we don't need the null check anymore - joins key comparison doesn't match nulls. However, we also remove the null check when we are not able to convert to JOIN and use APPLY instead.
    
    Fix is to save the original predicate before we try to extract the join predicate and then for APPLY case re-apply the original predicate and only use the extracted join predicate for the JOIN case.
    
    Fixes #27072
    maumar committed Jan 28, 2022
    Configuration menu
    Copy the full SHA
    d5003bc View commit details
    Browse the repository at this point in the history