diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-19 13:44:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-19 13:44:59 +0000 |
commit | ef2db38de92f2329c1c366318bddfc7e3dee8415 (patch) | |
tree | dee41de1eb0e05f2f6805b77df41a71b3aa66ec2 /tests/dialects/test_duckdb.py | |
parent | Adding upstream version 11.0.1. (diff) | |
download | sqlglot-8ce0ff6e4c5539b72e44b3a6fe1713bd042f69a5.tar.xz sqlglot-8ce0ff6e4c5539b72e44b3a6fe1713bd042f69a5.zip |
Adding upstream version 11.1.3.upstream/11.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.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/dialects/test_duckdb.py b/tests/dialects/test_duckdb.py index e5cb833..46e75c0 100644 --- a/tests/dialects/test_duckdb.py +++ b/tests/dialects/test_duckdb.py @@ -317,6 +317,8 @@ class TestDuckDB(Validator): }, ) + self.validate_identity("ATTACH DATABASE ':memory:' AS new_database") + with self.assertRaises(UnsupportedError): transpile( "SELECT a FROM b PIVOT(SUM(x) FOR y IN ('z', 'q'))", @@ -324,6 +326,14 @@ class TestDuckDB(Validator): unsupported_level=ErrorLevel.IMMEDIATE, ) + with self.assertRaises(UnsupportedError): + transpile( + "SELECT REGEXP_EXTRACT(a, 'pattern', 1) from table", + read="bigquery", + write="duckdb", + unsupported_level=ErrorLevel.IMMEDIATE, + ) + def test_array(self): self.validate_identity("ARRAY(SELECT id FROM t)") |