From 042432fc9a1f7c3d5d552f12449fe45109fbcd57 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 18:12:58 +0200 Subject: Adding upstream version 23.13.1. Signed-off-by: Daniel Baumann --- tests/dialects/test_duckdb.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/dialects/test_duckdb.py') diff --git a/tests/dialects/test_duckdb.py b/tests/dialects/test_duckdb.py index 9105a49..2d0af13 100644 --- a/tests/dialects/test_duckdb.py +++ b/tests/dialects/test_duckdb.py @@ -324,6 +324,8 @@ class TestDuckDB(Validator): self.validate_identity( "SELECT * FROM (PIVOT Cities ON Year USING SUM(Population) GROUP BY Country) AS pivot_alias" ) + self.validate_identity("DATE_SUB('YEAR', col, '2020-01-01')").assert_is(exp.Anonymous) + self.validate_identity("DATESUB('YEAR', col, '2020-01-01')").assert_is(exp.Anonymous) self.validate_all("0b1010", write={"": "0 AS b1010"}) self.validate_all("0x1010", write={"": "0 AS x1010"}) @@ -724,6 +726,14 @@ class TestDuckDB(Validator): """SELECT i FROM GENERATE_SERIES(0, 12) AS _(i) ORDER BY i ASC""", ) + self.validate_identity( + "COPY lineitem FROM 'lineitem.ndjson' WITH (FORMAT JSON, DELIMITER ',', AUTO_DETECT TRUE, COMPRESSION SNAPPY, CODEC ZSTD, FORCE_NOT_NULL(col1, col2))" + ) + self.validate_identity( + "COPY (SELECT 42 AS a, 'hello' AS b) TO 'query.json' WITH (FORMAT JSON, ARRAY TRUE)" + ) + self.validate_identity("COPY lineitem (l_orderkey) TO 'orderkey.tbl' WITH (DELIMITER '|')") + def test_array_index(self): with self.assertLogs(helper_logger) as cm: self.validate_all( -- cgit v1.2.3