diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-10-16 11:37:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-10-16 11:37:39 +0000 |
commit | f10d022e11dcd1015db1a74ce9f4198ebdcb7f40 (patch) | |
tree | ac7bdc1d214a0f97f991cff14e933f4895ee68e1 /tests/dialects/test_oracle.py | |
parent | Releasing progress-linux version 18.11.6-1. (diff) | |
download | sqlglot-f10d022e11dcd1015db1a74ce9f4198ebdcb7f40.tar.xz sqlglot-f10d022e11dcd1015db1a74ce9f4198ebdcb7f40.zip |
Merging upstream version 18.13.0.
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 | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/dialects/test_oracle.py b/tests/dialects/test_oracle.py index 5572ec1..d92eea5 100644 --- a/tests/dialects/test_oracle.py +++ b/tests/dialects/test_oracle.py @@ -234,21 +234,30 @@ MATCH_RECOGNIZE ( def test_json_table(self): self.validate_identity( - "SELECT * FROM JSON_TABLE(foo FORMAT JSON, 'bla' ERROR ON ERROR NULL ON EMPTY COLUMNS (foo PATH 'bar'))" + "SELECT * FROM JSON_TABLE(foo FORMAT JSON, 'bla' ERROR ON ERROR NULL ON EMPTY COLUMNS(foo PATH 'bar'))" ) self.validate_identity( "SELECT * FROM JSON_TABLE(foo FORMAT JSON, 'bla' ERROR ON ERROR NULL ON EMPTY COLUMNS foo PATH 'bar')", - "SELECT * FROM JSON_TABLE(foo FORMAT JSON, 'bla' ERROR ON ERROR NULL ON EMPTY COLUMNS (foo PATH 'bar'))", + "SELECT * FROM JSON_TABLE(foo FORMAT JSON, 'bla' ERROR ON ERROR NULL ON EMPTY COLUMNS(foo PATH 'bar'))", ) self.validate_identity( """SELECT CASE WHEN DBMS_LOB.GETLENGTH(info) < 32000 THEN DBMS_LOB.SUBSTR(info) END AS info_txt, info AS info_clob FROM schemaname.tablename ar -INNER JOIN JSON_TABLE(:emps, '$[*]' COLUMNS (empno NUMBER PATH '$')) jt +INNER JOIN JSON_TABLE(:emps, '$[*]' COLUMNS(empno NUMBER PATH '$')) jt ON ar.empno = jt.empno""", pretty=True, ) + self.validate_identity( + """SELECT + * +FROM JSON_TABLE(res, '$.info[*]' COLUMNS( + tempid NUMBER PATH '$.tempid', + NESTED PATH '$.calid[*]' COLUMNS(last_dt PATH '$.last_dt ') +)) src""", + pretty=True, + ) def test_connect_by(self): start = "START WITH last_name = 'King'" |