-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-24013][SQL] Remove unneeded compress in ApproximatePercentile #21133
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -284,8 +284,9 @@ class ApproximatePercentileQuerySuite extends QueryTest with SharedSQLContext wi | |
| } | ||
|
|
||
| test("SPARK-24013: unneeded compress can cause performance issues with sorted input") { | ||
| failAfter(20 seconds) { | ||
| assert(sql("select approx_percentile(id, array(0.1)) from range(10000000)").count() == 1) | ||
| failAfter(30 seconds) { | ||
| checkAnswer(sql("select approx_percentile(id, array(0.1)) from range(10000000)"), | ||
| Row(Array(999160))) | ||
|
||
| } | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this test looks pretty weird. Can we add some kind of unit test and move this test to PR description and say the perf has improved a lot after this patch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that this is not the best UT, but I couldn't find any better way to test this. If anybody has any idea of a better test, I am happy to follow your right suggestion...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add a UT for
ApproximatePercentile, and check that after callingadd,isCompressedis still false.