From cd37a3bcaced9283c20baa52837c96b524baec54 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 10 Oct 2023 10:53:14 +0200 Subject: Merging upstream version 18.11.6. Signed-off-by: Daniel Baumann --- tests/dialects/test_redshift.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests/dialects/test_redshift.py') diff --git a/tests/dialects/test_redshift.py b/tests/dialects/test_redshift.py index ae1b987..9f2761f 100644 --- a/tests/dialects/test_redshift.py +++ b/tests/dialects/test_redshift.py @@ -273,6 +273,22 @@ class TestRedshift(Validator): "SELECT DATE_ADD('day', 1, DATE('2023-01-01'))", "SELECT DATEADD(day, 1, CAST(DATE('2023-01-01') AS DATE))", ) + self.validate_identity( + """SELECT + c_name, + orders.o_orderkey AS orderkey, + index AS orderkey_index +FROM customer_orders_lineitem AS c, c.c_orders AS orders AT index +ORDER BY + orderkey_index""", + pretty=True, + ) + self.validate_identity( + "SELECT attr AS attr, JSON_TYPEOF(val) AS value_type FROM customer_orders_lineitem AS c, UNPIVOT c.c_orders[0] WHERE c_custkey = 9451" + ) + self.validate_identity( + "SELECT attr AS attr, JSON_TYPEOF(val) AS value_type FROM customer_orders_lineitem AS c, UNPIVOT c.c_orders AS val AT attr WHERE c_custkey = 9451" + ) def test_values(self): # Test crazy-sized VALUES clause to UNION ALL conversion to ensure we don't get RecursionError -- cgit v1.2.3