Uh oh!
There was an error while loading. Please reload this page.
[fix](hist) Fix unstable result of aggregrate function hist #38608 - #38876
[fix](hist) Fix unstable result of aggregrate function hist #38608#38876RoanHeNaN wants to merge 1 commit into
Conversation
…8608) * Target Fix unstable result of hist function when involving null value. * Reproduce test result of `regression-test/suites/query_p0/sql_functions/aggregate_functions/test_aggregate_all_functions2.groovy` is unstable, sql `SELECT histogram(k7, 5) FROM baseall` will sometimes acts like the second argument is not passed in. * Root reason We have short-circuit in AggregateFunctionNullVariadicInline, when this row is NULL, the value will not be added by the nested function. Implementation of histogram relies on its add method to get its seconds argument, when we have an all null value block, histogram will not get its seconds arg even if sql is like `select(k7, 5)`, so a max_bucket_num with default value 128 is serialized. When we do merging, and happens to deserialize the above block at last, the max_bucket_num in merge stage will be assigned to 128, and this leads to the wrong result. * Fix by Init value of max_bucket_num is assigned to 0, when we do merging, we will discard this aggregated data if its max_bucket_num is 0.
RoanHeNaN
commented
Aug 5, 2024
run buildall |
doris-robot
commented
Aug 5, 2024
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
clang-tidy review says "All clean, LGTM! 👍" |
doris-robot
commented
Aug 5, 2024
TeamCity be ut coverage result: |
doris-robot
commented
Aug 5, 2024
TPC-H: Total hot run time: 50176 ms |
doris-robot
commented
Aug 5, 2024
TPC-DS: Total hot run time: 204178 ms |
doris-robot
commented
Aug 5, 2024
ClickBench: Total hot run time: 30.82 s |
doris-robot
commented
Aug 5, 2024
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G' |
We're closing this PR because it hasn't been updated in a while. |
cherry pick from #38608