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] Query: Match correct predicate structure to convert apply to join #27292

Merged
merged 1 commit into from
Feb 3, 2022

Commits on Feb 2, 2022

  1. Query: Match correct predicate structure to convert apply to join

    Resolves #26756
    
    For property access on optional dependents sharing column with principal, we generate CaseExpression. In order to match them during join key search, we updated our recursive function to match shape of the test in CaseExpression which incorrectly matched similar structure outside of case block causing somewhat wrong join key to be extracted. While join key in itself could work, when generating partitions out of it due to paging operation, it gives incorrect results.
    The fix is to match the special structure of CaseExpression.Test separately. Also made the key comparison match more robust by only allowing column or case block to appear in condition. Other structures don't represent part of join key in a comparison.
    Null checks for join keys are handled separately so that we only remove null checks which are indeed used in comparison with other columns in other operations.
    smitpatel committed Feb 2, 2022
    Configuration menu
    Copy the full SHA
    804137a View commit details
    Browse the repository at this point in the history