Uh oh!
There was an error while loading. Please reload this page.
[feature](function) add approx_top_sum aggregation function - #43643
Conversation
doris-robot
commented
Nov 11, 2024
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
zzzxl1993
commented
Nov 12, 2024
run buildall |
zzzxl1993
commented
Nov 12, 2024
run buildall |
zzzxl1993
commented
Nov 12, 2024
run buildall |
| qt_sql """ select approx_top_k(clientip) from ${tableName}; """ | ||
| qt_sql """ select approx_top_k(clientip, 10) from ${tableName}; """ |
There was a problem hiding this comment.
May I ask why deleting these tests in a feature PR?
There was a problem hiding this comment.
Currently, it is difficult to implement default values for the variable arguments in the function framework. It is hoped that users will directly specify the last two parameters.
zzzxl1993
commented
Nov 12, 2024
run buildall |
| struct AggregateFunctionAttr { | ||
| bool enable_decimal256 {false}; | ||
| std::vector<std::pair<std::string, bool>> column_infos; | ||
| std::vector<std::string> column_names; |
There was a problem hiding this comment.
Why change this basic data structure?
There was a problem hiding this comment.
Optimize the redundant data structures added in approx_top_k.
| sub_writer.Key(_column_names[i].data(), _column_names[i].size()); | ||
| sub_writer.String(row_str.data(), row_str.size()); | ||
| } | ||
| sub_writer.Key("count"); |
| @Override | ||
| public void checkLegalityBeforeTypeCoercion() { | ||
| if (arity() < 1) { | ||
| if (arity() < 3) { |
There was a problem hiding this comment.
Why change arguments num from 1 to 3?
There was a problem hiding this comment.
The existing function framework code cannot implement approx_top_k and approx_top_sum with default values.
zzzxl1993
commented
Nov 14, 2024
run buildall |
doris-robot
commented
Nov 14, 2024
TeamCity be ut coverage result: |
zzzxl1993
commented
Nov 15, 2024
run buildall |
doris-robot
commented
Nov 15, 2024
TeamCity be ut coverage result: |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
…3643) Problem Summary: 1. The function approx_top_sum has been implemented. Here is an example of its usage: select approx_top_sum(c1, c2, c3, 10, 300) from tbl. ### Release note Add new function `approx_top_sum`.
…3643) Problem Summary: 1. The function approx_top_sum has been implemented. Here is an example of its usage: select approx_top_sum(c1, c2, c3, 10, 300) from tbl. Add new function `approx_top_sum`.
…3643) Problem Summary: 1. The function approx_top_sum has been implemented. Here is an example of its usage: select approx_top_sum(c1, c2, c3, 10, 300) from tbl. ### Release note Add new function `approx_top_sum`.
What problem does this PR solve?
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)