Repository navigation
Backport #122512 to 26.8: Fix constant-condition if/multiIf GROUP BY keys with the identifier resolve cache and group_by_use_nulls - #132939
robot-ch-test-poll3 wants to merge 1 commit into
Conversation
|
Workflow [BackportPR], commit [7581b56] Summary: ❌
|
|
This backport, and #132940 for 26.9, bring two regressions that #122512 caused on master and #125828 fixed there: #125803 (rolled-up rows get the key's value instead of NULL) and #125804 ( Measured with
-- Q1
SELECT count() FROM (SELECT n, if(n = 5, toString(n), if(1, if(n > 1, 'p', 'q'), 'z')) AS e FROM (SELECT arrayJoin([1, 2]) AS n) GROUP BY ROLLUP(n, if(1, if(n > 1, 'p', 'q'), 'z')) HAVING e IS NULL SETTINGS group_by_use_nulls = 1, optimize_if_chain_to_multiif = 1);
-- Q2
SELECT if(1, tuple(a), tuple(0)) AS k, count() FROM (SELECT number % 3 AS a FROM numbers(10)) GROUP BY ROLLUP(k) ORDER BY k SETTINGS group_by_use_nulls = 1;#125828 merges without conflicts onto the heads of this PR and #132940 and onto 26.10, so Separately, the tests of #122512 fail on 26.8: |
Original pull-request #122512
This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.
The PR source
The PR is created in the CI job