Uh oh!
There was an error while loading. Please reload this page.
[SPARK-33486][SQL] Collapse Partial and Final physical aggregation nodes together whenever possible - #30426
Conversation
maropu
commented
Nov 19, 2020
ok to test |
SparkQA
commented
Nov 19, 2020
Test build #131346 has finished for PR 30426 at commit
|
prakharjain09
commented
Nov 19, 2020
maropu
commented
Nov 19, 2020
I remember SPARK-12978 (#15945 and #10896) and is this related to it? cc: @cloud-fan Btw, have you checked if this optimization could make some queries (e.g., TPCDS) faster? (I just want to know actual performance numbers) |
SparkQA
commented
Nov 19, 2020
Kubernetes integration test starting |
SparkQA
commented
Nov 19, 2020
Kubernetes integration test status failure |
SparkQA
commented
Nov 19, 2020
Kubernetes integration test starting |
SparkQA
commented
Nov 19, 2020
Kubernetes integration test status success |
SparkQA
commented
Nov 19, 2020
Test build #131347 has finished for PR 30426 at commit
|
prakharjain09
commented
Nov 19, 2020
@maropu Thanks for pointing out to old PR and jirs - Yes SPARK-12978 seems related to SPARK-33486.
I did impact analysis on TPCDS 100 scale and didn't find noticeable improvement - In TPCDS at most of the places, the 1st HashAggregate (HA) reduces rows significantly and the 2nd HA doesn't take a lot of time after that. But we have seen some good improvements in some customer queries - Specifically when HA-1 doesn't reduce rows significantly. |
SparkQA
commented
Nov 19, 2020
Kubernetes integration test starting |
SparkQA
commented
Nov 19, 2020
Kubernetes integration test status success |
SparkQA
commented
Nov 19, 2020
Test build #131360 has finished for PR 30426 at commit
|
SparkQA
commented
Nov 20, 2020
Test build #131425 has finished for PR 30426 at commit
|
dfad4fc to
a56846dCompareSparkQA
commented
Nov 20, 2020
Kubernetes integration test starting |
SparkQA
commented
Nov 20, 2020
Kubernetes integration test starting |
SparkQA
commented
Nov 20, 2020
Kubernetes integration test status failure |
SparkQA
commented
Nov 20, 2020
Kubernetes integration test status failure |
SparkQA
commented
Nov 20, 2020
Test build #131427 has finished for PR 30426 at commit
|
prakharjain09
commented
Nov 23, 2020
@maropu@cloud-fan Gentle reminder - Please review the changes and provide your feedback. |
maropu
commented
Nov 24, 2020
Yea, I've checked TPCDS performances w/this change again by myself, but I couldn't find any improvement. So, could you give us a concrete example of how much it will improve performance? This change can make rules complicated, so I think we need to consider the tradeoff between complexity and performance improvements. |
prakharjain09
commented
Nov 27, 2020
@maropu We have seen customer queries where Aggregation happens on close to primary keys. In those scenarios, it makes complete sense to remove redundant Aggregation operator as it will unnecessarily increase the execution time. |
abmodi
commented
Dec 4, 2020
We have also seen the use case with customers when they do aggregation on close to primary keys. |
We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable. |
What changes were proposed in this pull request?
This PR tries to reduce the number of physical aggregation nodes by collapsing the PARTIAL and the FINAL aggregation nodes together when there is no Exchange between them.
Example - consider the following query:
Current plan:
The above plan can be optimized to following:
Why are the changes needed?
This change removed the unrequired Aggregation node and so will help in improving performance.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Added UTs.