Skip to content

Conversation

@cloud-fan
Copy link
Contributor

What changes were proposed in this pull request?

This PR is a followup of #35779 , to propagate distinct keys more precisely in 2 cases:

  1. For LIMIT 1, each output attribute is a distinct key, not the entire tuple.
  2. For aggregate, we can still propagate distinct keys from child.

Why are the changes needed?

make the optimization cover more cases

Does this PR introduce any user-facing change?

no

How was this patch tested?

new tests

@cloud-fan
Copy link
Contributor Author

cc @wangyum

@github-actions github-actions bot added the SQL label Apr 7, 2022
@wangyum wangyum closed this in fbe82fb Apr 8, 2022
wangyum pushed a commit that referenced this pull request Apr 8, 2022
### What changes were proposed in this pull request?

This PR is a followup of #35779 , to propagate distinct keys more precisely in 2 cases:
1. For `LIMIT 1`, each output attribute is a distinct key, not the entire tuple.
2. For aggregate, we can still propagate distinct keys from child.

### Why are the changes needed?

make the optimization cover more cases

### Does this PR introduce _any_ user-facing change?

no

### How was this patch tested?

new tests

Closes #36100 from cloud-fan/followup.

Authored-by: Wenchen Fan <[email protected]>
Signed-off-by: Yuming Wang <[email protected]>
(cherry picked from commit fbe82fb)
Signed-off-by: Yuming Wang <[email protected]>
@wangyum
Copy link
Member

wangyum commented Apr 8, 2022

Merged to master and branch-3.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants