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

opt: map and push down equality conditions #41250

Merged
merged 1 commit into from
Oct 8, 2019

Commits on Oct 8, 2019

  1. opt: add equality push-down rule and map equalities in AssociateJoin …

    …rule
    
    This commit adds a new normalization rule to enable pushing variable
    equality conditions such as a.x=b.x through joins.
    
    For example, consider this query:
    
      SELECT * FROM a, b, c WHERE a.x=b.x AND a.x=c.x
    
    Given join ordering (a join (b join c)), it should be possible to infer the
    filter b.x=c.x and push it down from the top level onto the join (b join c).
    This commit enables that mapping and pushdown to happen.
    
    In addition, this commit updates the AssociateJoin rule to map as many
    equality conditions as possible to use the output columns of the new inner-most
    join, allowing those conditions to be pushed onto that join.
    
    For example, consider this query:
    
      SELECT * FROM a, b, c WHERE a.x=b.x AND b.x=c.x
    
    If the AssociateJoin rule creates a new join ordering (b join (a join c)),
    it should be possible to map a.x=b.x to a.x=c.x and add it onto the new
    inner-most join (a join c). This commit enables that mapping to happen.
    
    Release note (performance improvement): Improved performance for some join
    queries due to improved filter inference during planning.
    Release justification: This commit will not be merged before the release
    branch is cut.
    rytaft committed Oct 8, 2019
    Configuration menu
    Copy the full SHA
    df6d188 View commit details
    Browse the repository at this point in the history