diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-03-12 10:17:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-03-12 10:17:12 +0000 |
commit | e53bec16fb5ba08b2ff8daf3ffe5467a7c24b757 (patch) | |
tree | c13a841e8033707ca74d492bac3ebfc5bd9dd393 /tests/dialects/test_postgres.py | |
parent | Adding upstream version 11.3.3. (diff) | |
download | sqlglot-9223f39e389c515847532b0faf15279cc861ed82.tar.xz sqlglot-9223f39e389c515847532b0faf15279cc861ed82.zip |
Adding upstream version 11.3.6.upstream/11.3.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_postgres.py')
-rw-r--r-- | tests/dialects/test_postgres.py | 39 |
1 files changed, 4 insertions, 35 deletions
diff --git a/tests/dialects/test_postgres.py b/tests/dialects/test_postgres.py index 0881a89..c8dea95 100644 --- a/tests/dialects/test_postgres.py +++ b/tests/dialects/test_postgres.py @@ -71,6 +71,9 @@ class TestPostgres(Validator): ) def test_postgres(self): + self.validate_identity("SELECT ARRAY[1, 2, 3] @> ARRAY[1, 2]") + self.validate_identity("SELECT ARRAY[1, 2, 3] <@ ARRAY[1, 2]") + self.validate_identity("SELECT ARRAY[1, 2, 3] && ARRAY[1, 2]") self.validate_identity("$x") self.validate_identity("SELECT ARRAY[1, 2, 3]") self.validate_identity("SELECT ARRAY(SELECT 1)") @@ -115,40 +118,6 @@ class TestPostgres(Validator): self.validate_identity("x ~* 'y'") self.validate_all( - "1 / 2", - read={ - "drill": "1 / 2", - "duckdb": "1 / 2", - "postgres": "1 / 2", - "presto": "1 / 2", - "redshift": "1 / 2", - "sqlite": "1 / 2", - "teradata": "1 / 2", - "trino": "1 / 2", - "tsql": "1 / 2", - }, - write={ - "drill": "1 / 2", - "duckdb": "1 / 2", - "postgres": "1 / 2", - "presto": "1 / 2", - "redshift": "1 / 2", - "sqlite": "1 / 2", - "teradata": "1 / 2", - "trino": "1 / 2", - "tsql": "1 / 2", - "bigquery": "CAST(1 / 2 AS INT64)", - "clickhouse": "CAST(1 / 2 AS Int32)", - "databricks": "CAST(1 / 2 AS INT)", - "hive": "CAST(1 / 2 AS INT)", - "mysql": "CAST(1 / 2 AS INT)", - "oracle": "CAST(1 / 2 AS NUMBER)", - "snowflake": "CAST(1 / 2 AS INT)", - "spark": "CAST(1 / 2 AS INT)", - "starrocks": "CAST(1 / 2 AS INT)", - }, - ) - self.validate_all( "SELECT (DATE '2016-01-10', DATE '2016-02-01') OVERLAPS (DATE '2016-01-20', DATE '2016-02-10')", write={ "postgres": "SELECT (CAST('2016-01-10' AS DATE), CAST('2016-02-01' AS DATE)) OVERLAPS (CAST('2016-01-20' AS DATE), CAST('2016-02-10' AS DATE))", @@ -196,7 +165,7 @@ class TestPostgres(Validator): self.validate_all( "CREATE TABLE x (a UUID, b BYTEA)", write={ - "duckdb": "CREATE TABLE x (a UUID, b VARBINARY)", + "duckdb": "CREATE TABLE x (a UUID, b BLOB)", "presto": "CREATE TABLE x (a UUID, b VARBINARY)", "hive": "CREATE TABLE x (a UUID, b BINARY)", "spark": "CREATE TABLE x (a UUID, b BINARY)", |