diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-10-15 13:52:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-10-15 13:52:53 +0000 |
commit | 97d3673ec2d668050912aa6aea1816885ca6c5ab (patch) | |
tree | f391e30e039a3d22368e9696e171f759e104c765 /tests/dialects/test_hive.py | |
parent | Adding upstream version 6.3.1. (diff) | |
download | sqlglot-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_hive.py')
-rw-r--r-- | tests/dialects/test_hive.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/dialects/test_hive.py b/tests/dialects/test_hive.py index acb3be9..69c7630 100644 --- a/tests/dialects/test_hive.py +++ b/tests/dialects/test_hive.py @@ -127,21 +127,23 @@ class TestHive(Validator): def test_ddl(self): self.validate_all( - "CREATE TABLE test STORED AS parquet TBLPROPERTIES ('x'='1', 'Z'='2') AS SELECT 1", - write={ - "presto": "CREATE TABLE test WITH (FORMAT='parquet', x='1', Z='2') AS SELECT 1", - "hive": "CREATE TABLE test STORED AS PARQUET TBLPROPERTIES ('x'='1', 'Z'='2') AS SELECT 1", - "spark": "CREATE TABLE test USING PARQUET TBLPROPERTIES ('x'='1', 'Z'='2') AS SELECT 1", - }, - ) - self.validate_all( "CREATE TABLE x (w STRING) PARTITIONED BY (y INT, z INT)", write={ + "duckdb": "CREATE TABLE x (w TEXT)", # Partition columns should exist in table "presto": "CREATE TABLE x (w VARCHAR, y INTEGER, z INTEGER) WITH (PARTITIONED_BY=ARRAY['y', 'z'])", "hive": "CREATE TABLE x (w STRING) PARTITIONED BY (y INT, z INT)", "spark": "CREATE TABLE x (w STRING) PARTITIONED BY (y INT, z INT)", }, ) + self.validate_all( + "CREATE TABLE test STORED AS parquet TBLPROPERTIES ('x'='1', 'Z'='2') AS SELECT 1", + write={ + "duckdb": "CREATE TABLE test AS SELECT 1", + "presto": "CREATE TABLE test WITH (FORMAT='parquet', x='1', Z='2') AS SELECT 1", + "hive": "CREATE TABLE test STORED AS PARQUET TBLPROPERTIES ('x'='1', 'Z'='2') AS SELECT 1", + "spark": "CREATE TABLE test USING PARQUET TBLPROPERTIES ('x'='1', 'Z'='2') AS SELECT 1", + }, + ) def test_lateral_view(self): self.validate_all( |