ISSUES-16574 try fix remote query failure when using 'if' suffix aggregate function #16610
Conversation
I'm not sure if I should fix this. because the second argument type is not UInt8 |
|
CC: @KochetovNicolai |
Agree. It is expected. |
|
AST fuzzer — Assertion `V && "PHI node got a null value!"' failed -- looks unrelated |
|
One test has failed. |
|
@alexey-milovidov This is correct? |
|
test have been added in 85ed639 from @KochetovNicolai |
Some queries have unexpected duration - unrelated |
|
Also #16588 may be affected |
(cherry picked from commit b5a8ef3)
…hen using 'if' suffix aggregate function
…en using 'if' suffix aggregate function
…en using 'if' suffix aggregate function
…hen using 'if' suffix aggregate function
Backport #16610 to 20.11: ISSUES-16574 try fix remote query failure when using 'if' suffix aggregate function
Backport #16610 to 20.10: ISSUES-16574 try fix remote query failure when using 'if' suffix aggregate function
Backport #16610 to 20.8: ISSUES-16574 try fix remote query failure when using 'if' suffix aggregate function
Backport #16610 to 20.9: ISSUES-16574 try fix remote query failure when using 'if' suffix aggregate function
sumIf(Nullable()) and similar unary functions (unary w/o If combinator) was working incorrectly, since it returns "sum" from the getName() helper, and so distributed query processing fails. The problem is in the optimization in AggregateFunctionIfNullUnary::add() for the unary functions. It pass only one column to write result to, instead of all passed arguments + result columns. While AggregateFunctionIf::add() assumes that it accepts arguments + result columns, and use last column as a result. Introduced-in: ClickHouse#16610 Fixes: ClickHouse#18210
|
@KochetovNicolai The fix was not backported to 20.8: |
|
Looks like #18806. |
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
fixes #16574
fixes #16231
fix remote query failure when using 'if' suffix aggregate function