Skip to content

Commit

Permalink
avoid random
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangjinwu committed Mar 31, 2023
1 parent 22a9e5f commit 479e12f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/tests/regress/data/expected/case.out
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ SELECT '6' AS "One",
(1 row)

SELECT '7' AS "None",
CASE WHEN random() < 0 THEN 1
CASE WHEN 1 < 0 THEN 1
END AS "NULL on no matches";
None | NULL on no matches
------+--------------------
Expand Down
6 changes: 3 additions & 3 deletions src/tests/regress/data/sql/case.sql
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ SELECT '6' AS "One",
END AS "Two WHEN with default";


--@ SELECT '7' AS "None",
--@ CASE WHEN random() < 0 THEN 1
--@ END AS "NULL on no matches";
SELECT '7' AS "None",
CASE WHEN 1 < 0 THEN 1
END AS "NULL on no matches";

-- Constant-expression folding shouldn't evaluate unreachable subexpressions
SELECT CASE WHEN 1=0 THEN 1/0 WHEN 1=1 THEN 1 ELSE 2/0 END;
Expand Down

0 comments on commit 479e12f

Please sign in to comment.