From d7f0758e21b5111b5327f3839c5c9f49a04d272b Mon Sep 17 00:00:00 2001
From: Daniel Baumann <daniel.baumann@progress-linux.org>
Date: Wed, 4 Oct 2023 14:14:40 +0200
Subject: Adding upstream version 18.11.2.

Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
---
 tests/fixtures/optimizer/canonicalize.sql | 12 ++++++++++++
 1 file changed, 12 insertions(+)

(limited to 'tests/fixtures/optimizer/canonicalize.sql')

diff --git a/tests/fixtures/optimizer/canonicalize.sql b/tests/fixtures/optimizer/canonicalize.sql
index e27b2d3..2ba762d 100644
--- a/tests/fixtures/optimizer/canonicalize.sql
+++ b/tests/fixtures/optimizer/canonicalize.sql
@@ -29,6 +29,12 @@ SELECT "x"."a" AS "a" FROM "x" AS "x" GROUP BY "x"."a" HAVING SUM("x"."b") <> 0
 SELECT a FROM x WHERE 1;
 SELECT "x"."a" AS "a" FROM "x" AS "x" WHERE 1 <> 0;
 
+SELECT a FROM x WHERE COALESCE(0, 1);
+SELECT "x"."a" AS "a" FROM "x" AS "x" WHERE COALESCE(0 <> 0, 1 <> 0);
+
+SELECT a FROM x WHERE CASE WHEN COALESCE(b, 1) THEN 1 ELSE 0 END;
+SELECT "x"."a" AS "a" FROM "x" AS "x" WHERE CASE WHEN COALESCE("x"."b" <> 0, 1 <> 0) THEN 1 ELSE 0 END <> 0;
+
 --------------------------------------
 -- Replace date functions
 --------------------------------------
@@ -40,3 +46,9 @@ CAST('2023-01-01' AS TIMESTAMP);
 
 TIMESTAMP('2023-01-01', '12:00:00');
 TIMESTAMP('2023-01-01', '12:00:00');
+
+DATE_ADD(CAST("x" AS DATE), 1, 'YEAR');
+DATE_ADD(CAST("x" AS DATE), 1, 'YEAR');
+
+DATE_ADD('2023-01-01', 1, 'YEAR');
+DATE_ADD(CAST('2023-01-01' AS DATE), 1, 'YEAR');
-- 
cgit v1.2.3

