Skip to content

Commit

Permalink
Merge pull request ClickHouse#58076 from CurtizJ/fix-test-02567
Browse files Browse the repository at this point in the history
Fix flaky test `02567_and_consistency`
  • Loading branch information
alexey-milovidov authored Dec 20, 2023
2 parents bf7ed78 + be398d2 commit 10a9ed0
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions tests/queries/0_stateless/02567_and_consistency.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ FROM
)
GROUP BY number
HAVING 1 AND sin(sum(number))
ORDER BY ALL
SETTINGS enable_optimize_predicate_expression = 0;

SELECT '=====';
Expand All @@ -16,6 +17,7 @@ FROM
)
GROUP BY number
HAVING 1 AND sin(1)
ORDER BY ALL
SETTINGS enable_optimize_predicate_expression = 0;

SELECT '=====';
Expand All @@ -27,6 +29,7 @@ FROM
)
GROUP BY number
HAVING x AND sin(sum(number))
ORDER BY ALL
SETTINGS enable_optimize_predicate_expression = 1;

SELECT '=====';
Expand All @@ -38,6 +41,7 @@ FROM
)
GROUP BY number
HAVING 1 AND sin(sum(number))
ORDER BY ALL
SETTINGS enable_optimize_predicate_expression = 0;

SELECT '=====';
Expand All @@ -57,6 +61,7 @@ FROM
)
GROUP BY number
HAVING 1 AND sin(sum(number))
ORDER BY ALL
SETTINGS enable_optimize_predicate_expression = 1;

select '#45440';
Expand All @@ -72,12 +77,16 @@ SELECT
NOT h,
h IS NULL
FROM t2 AS left
GROUP BY g;
select '=';
GROUP BY g
ORDER BY g DESC;

SELECT '=';

SELECT MAX(left.c0), min2(left.c0, -(-left.c0) * (radians(left.c0) - radians(left.c0))) as g, (((-1925024212 IS NOT NULL) IS NOT NULL) != radians(tan(1216286224))) AND cos(lcm(MAX(left.c0), -1966575216) OR (MAX(left.c0) * 1180517420)) as h, not h, h is null
FROM t2 AS left
GROUP BY g HAVING h ORDER BY g DESC SETTINGS enable_optimize_predicate_expression = 0;
select '=';
SELECT '=';

SELECT MAX(left.c0), min2(left.c0, -(-left.c0) * (radians(left.c0) - radians(left.c0))) as g, (((-1925024212 IS NOT NULL) IS NOT NULL) != radians(tan(1216286224))) AND cos(lcm(MAX(left.c0), -1966575216) OR (MAX(left.c0) * 1180517420)) as h, not h, h is null
FROM t2 AS left
GROUP BY g HAVING h ORDER BY g DESC SETTINGS enable_optimize_predicate_expression = 1;
Expand Down

0 comments on commit 10a9ed0

Please sign in to comment.