Skip to content

[SPARK-36194][SQL][FOLLOWUP] Propagate distinct keys more precisely - #36100

Closed
cloud-fan wants to merge 1 commit into
apache:masterfrom
cloud-fan:followup
Closed

[SPARK-36194][SQL][FOLLOWUP] Propagate distinct keys more precisely#36100
cloud-fan wants to merge 1 commit into
apache:masterfrom
cloud-fan:followup

Conversation

@cloud-fan

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

cc @wangyum

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 <wenchen@databricks.com>
Signed-off-by: Yuming Wang <yumwang@ebay.com>
(cherry picked from commit fbe82fb)
Signed-off-by: Yuming Wang <yumwang@ebay.com>
@wangyum

Copy link
Copy Markdown
Member

Merged to master and branch-3.3.

Sign up for freeto 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

@cloud-fan@wangyum