diff --git a/tests/queries/0_stateless/02374_combine_multi_if_and_count_if_opt.sql b/tests/queries/0_stateless/02374_combine_multi_if_and_count_if_opt.sql index 9f3e9a92a91..c3367873042 100644 --- a/tests/queries/0_stateless/02374_combine_multi_if_and_count_if_opt.sql +++ b/tests/queries/0_stateless/02374_combine_multi_if_and_count_if_opt.sql @@ -4,6 +4,10 @@ create table m (a int) engine Log; insert into m values (1); -explain syntax select sum(multiIf(a = 1, 1, 0)) from m settings optimize_rewrite_sum_if_to_count_if=1; +set optimize_rewrite_sum_if_to_count_if=1; + +explain syntax select sum(multiIf(a = 1, 1, 0)) from m; + +set optimize_rewrite_sum_if_to_count_if=0; drop table m;