diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-10-04 12:14:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-10-04 12:14:40 +0000 |
commit | d7f0758e21b5111b5327f3839c5c9f49a04d272b (patch) | |
tree | a425f4ebcc159d6bd9443fe4e0e2f9eb20151027 /tests/dialects/test_oracle.py | |
parent | Adding upstream version 18.7.0. (diff) | |
download | sqlglot-5adc6d88e55eac2ec9a34f3963f456d0c19a848f.tar.xz sqlglot-5adc6d88e55eac2ec9a34f3963f456d0c19a848f.zip |
Adding upstream version 18.11.2.upstream/18.11.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_oracle.py')
-rw-r--r-- | tests/dialects/test_oracle.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/dialects/test_oracle.py b/tests/dialects/test_oracle.py index 675ee8a..5572ec1 100644 --- a/tests/dialects/test_oracle.py +++ b/tests/dialects/test_oracle.py @@ -22,8 +22,6 @@ class TestOracle(Validator): self.validate_identity("SELECT * FROM t FOR UPDATE OF s.t.c, s.t.v SKIP LOCKED") self.validate_identity("SELECT STANDARD_HASH('hello')") self.validate_identity("SELECT STANDARD_HASH('hello', 'MD5')") - self.validate_identity("SELECT CAST(NULL AS VARCHAR2(2328 CHAR)) AS COL1") - self.validate_identity("SELECT CAST(NULL AS VARCHAR2(2328 BYTE)) AS COL1") self.validate_identity("SELECT * FROM table_name@dblink_name.database_link_domain") self.validate_identity("SELECT * FROM table_name SAMPLE (25) s") self.validate_identity("SELECT * FROM V$SESSION") @@ -61,6 +59,20 @@ class TestOracle(Validator): ) self.validate_all( + "SELECT CAST(NULL AS VARCHAR2(2328 CHAR)) AS COL1", + write={ + "oracle": "SELECT CAST(NULL AS VARCHAR2(2328 CHAR)) AS COL1", + "spark": "SELECT CAST(NULL AS VARCHAR(2328)) AS COL1", + }, + ) + self.validate_all( + "SELECT CAST(NULL AS VARCHAR2(2328 BYTE)) AS COL1", + write={ + "oracle": "SELECT CAST(NULL AS VARCHAR2(2328 BYTE)) AS COL1", + "spark": "SELECT CAST(NULL AS VARCHAR(2328)) AS COL1", + }, + ) + self.validate_all( "NVL(NULL, 1)", write={ "": "COALESCE(NULL, 1)", |