diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-24 07:49:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-24 07:49:59 +0000 |
commit | 43a52bccf5bf17217a2734f4680c00a102f82cac (patch) | |
tree | b745cdd5b462b8f0fbd9b54390f4676a48aae33a /tests/fixtures/optimizer | |
parent | Releasing debian version 20.3.0-1. (diff) | |
download | sqlglot-43a52bccf5bf17217a2734f4680c00a102f82cac.tar.xz sqlglot-43a52bccf5bf17217a2734f4680c00a102f82cac.zip |
Merging upstream version 20.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/fixtures/optimizer')
-rw-r--r-- | tests/fixtures/optimizer/simplify.sql | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/fixtures/optimizer/simplify.sql b/tests/fixtures/optimizer/simplify.sql index fbf5d2c..d3b03fb 100644 --- a/tests/fixtures/optimizer/simplify.sql +++ b/tests/fixtures/optimizer/simplify.sql @@ -696,6 +696,18 @@ x <> 1; NOT 1 <> x; x = 1; +x > CAST('2024-01-01' AS DATE) OR x > CAST('2023-12-31' AS DATE); +x > CAST('2023-12-31' AS DATE); + +CAST(x AS DATE) > CAST('2024-01-01' AS DATE) OR CAST(x AS DATE) > CAST('2023-12-31' AS DATE); +CAST(x AS DATE) > CAST('2023-12-31' AS DATE); + +FUN() > 0 OR FUN() > 1; +FUN() > 0; + +RAND() > 0 OR RAND() > 1; +RAND() > 0 OR RAND() > 1; + -------------------------------------- -- COALESCE -------------------------------------- @@ -835,7 +847,7 @@ DATE_TRUNC('quarter', x) = CAST('2021-01-02' AS DATE); DATE_TRUNC('quarter', x) = CAST('2021-01-02' AS DATE); DATE_TRUNC('year', x) <> CAST('2021-01-01' AS DATE); -x < CAST('2021-01-01' AS DATE) AND x >= CAST('2022-01-01' AS DATE); +FALSE; -- Always true, except for nulls DATE_TRUNC('year', x) <> CAST('2021-01-02' AS DATE); |