summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_duckdb.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-10-15 13:52:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-10-15 13:52:53 +0000
commit97d3673ec2d668050912aa6aea1816885ca6c5ab (patch)
treef391e30e039a3d22368e9696e171f759e104c765 /tests/dialects/test_duckdb.py
parentAdding upstream version 6.3.1. (diff)
downloadsqlglot-97d3673ec2d668050912aa6aea1816885ca6c5ab.tar.xz
sqlglot-97d3673ec2d668050912aa6aea1816885ca6c5ab.zip
Adding upstream version 7.1.3.upstream/7.1.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_duckdb.py')
-rw-r--r--tests/dialects/test_duckdb.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/dialects/test_duckdb.py b/tests/dialects/test_duckdb.py
index 96e51df..298b3e9 100644
--- a/tests/dialects/test_duckdb.py
+++ b/tests/dialects/test_duckdb.py
@@ -66,6 +66,23 @@ class TestDuckDB(Validator):
def test_duckdb(self):
self.validate_all(
+ "CREATE TABLE IF NOT EXISTS table (cola INT, colb STRING) USING ICEBERG PARTITIONED BY (colb)",
+ write={
+ "duckdb": "CREATE TABLE IF NOT EXISTS table (cola INT, colb TEXT)",
+ },
+ )
+
+ self.validate_all(
+ "COL::BIGINT[]",
+ write={
+ "duckdb": "CAST(COL AS BIGINT[])",
+ "presto": "CAST(COL AS ARRAY(BIGINT))",
+ "hive": "CAST(COL AS ARRAY<BIGINT>)",
+ "spark": "CAST(COL AS ARRAY<LONG>)",
+ },
+ )
+
+ self.validate_all(
"LIST_VALUE(0, 1, 2)",
read={
"spark": "ARRAY(0, 1, 2)",