-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-53960][SQL] Let approx_top_k_accumulate/combine/estimate handle NULLs #52673
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
Conversation
| } | ||
| } | ||
|
|
||
| def updateSketchBuffer( |
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.
Unused functions as update and evaluation are handled by ApproxTopKAggregateBuffer, not on ItemsSketch anymore.
| } | ||
|
|
||
| test("SPARK-53960: combine and estimate count NULL values") { | ||
| sql( |
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.
nit: let's add withView before each test case
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.
Thanks. Added to all tests with views.
| checkAnswer(est, Row(Seq(Row(null, 4), Row("b", 3)))) | ||
| } | ||
|
|
||
| test("SPARK-53960: combine with a sketch of all nulls") { |
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.
nit: let's test combining two sketches of all nulls
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.
gengliangwang
left a comment
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.
LGTM except minor comments
|
Thanks, merging to master |
…e NULLs ### What changes were proposed in this pull request? As a follow-up of apache#52655, add NULL handling in approx_top_k_accumulate/estimate/combine. ### Why are the changes needed? ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? New unit tests on null handling for accumulate, combine and estimate. ### Was this patch authored or co-authored using generative AI tooling? No Closes apache#52673 from yhuang-db/accumulate_estimate_count_null. Authored-by: yhuang-db <[email protected]> Signed-off-by: Gengliang Wang <[email protected]>
What changes were proposed in this pull request?
As a follow-up of #52655, add NULL handling in approx_top_k_accumulate/estimate/combine.
Why are the changes needed?
Does this PR introduce any user-facing change?
No
How was this patch tested?
New unit tests on null handling for accumulate, combine and estimate.
Was this patch authored or co-authored using generative AI tooling?
No