Revert "Merge pull request #34055 from palegre-tiny/groupSortedArray"#36822
Revert "Merge pull request #34055 from palegre-tiny/groupSortedArray"#36822alexey-milovidov merged 5 commits intomasterfrom
Conversation
|
@Mergifyio update |
✅ Branch has been successfully updated |
|
@alexey-milovidov maybe it worth give this function a try, after #36815? (although implementation looks complex, at least to me) |
|
It's not the first time we forgot to test ser/de or merge, let's do fuzzing of table engines (replace every table to distributed table). |
|
Btw, why this particular function useful? |
I don't need it, but I guess original developer (@palegre-tiny) will not be happy if it will be removed. P.S. I don't have any strong opinion here, this is just basic thoughts about almost every "function" |
|
Ok, let's merge the fix first. |
|
But there are other code cleanups required, maybe you can make full code review and cleanup of this function? |
Because it should allow you to get top x values by sorting in cheap way.
|
|
We need this feature for some scenarios and we didn't see any acceptable alternatives. I could clean up or simplify the code if it's not clear. |
|
Do you mind if I will revert it temporarily just because it has memory safety issue and our master branch must be 100% memory safe? Then we will merge #36815 when it will be ready. |
Sure, lets do like that. Thank you. |
|
|
||
| [1,1,2,2] 0 0 6000 | ||
| -- sum() can be compiled, check that compiled version works correctly | ||
| select groupArraySorted(partition), parent_key, child_key, sum(value) from data_02233 group by parent_key, child_key with totals order by parent_key, child_key settings optimize_aggregation_in_order=1, compile_aggregate_expressions=1, min_count_to_compile_aggregate_expression=0; |
There was a problem hiding this comment.
Now we don't have explicit test for optimize_aggregation_in_order and compiled aggregate functions...
Will address this later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Remove function
groupArraySortedwhich has a bug.This reverts commit f055d7b, reversing
changes made to 4ec3c35.
Bug has been found.
The function will not be returned back unless both of these conditions will be satistied: