diff options
Diffstat (limited to 'tests/dialects/test_oracle.py')
-rw-r--r-- | tests/dialects/test_oracle.py | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/tests/dialects/test_oracle.py b/tests/dialects/test_oracle.py index 4813a49..77f46e4 100644 --- a/tests/dialects/test_oracle.py +++ b/tests/dialects/test_oracle.py @@ -251,7 +251,6 @@ class TestOracle(Validator): """SELECT * FROM t ORDER BY a ASC NULLS LAST, b ASC NULLS FIRST, c DESC NULLS LAST, d DESC NULLS FIRST""", """SELECT * FROM t ORDER BY a ASC, b ASC NULLS FIRST, c DESC NULLS LAST, d DESC""", ) - self.validate_all( "NVL(NULL, 1)", write={ @@ -260,6 +259,29 @@ class TestOracle(Validator): "clickhouse": "COALESCE(NULL, 1)", }, ) + self.validate_all( + "LTRIM('Hello World', 'H')", + write={ + "": "LTRIM('Hello World', 'H')", + "oracle": "LTRIM('Hello World', 'H')", + "clickhouse": "TRIM(LEADING 'H' FROM 'Hello World')", + }, + ) + self.validate_all( + "RTRIM('Hello World', 'd')", + write={ + "": "RTRIM('Hello World', 'd')", + "oracle": "RTRIM('Hello World', 'd')", + "clickhouse": "TRIM(TRAILING 'd' FROM 'Hello World')", + }, + ) + self.validate_all( + "TRIM(BOTH 'h' FROM 'Hello World')", + write={ + "oracle": "TRIM(BOTH 'h' FROM 'Hello World')", + "clickhouse": "TRIM(BOTH 'h' FROM 'Hello World')", + }, + ) def test_join_marker(self): self.validate_identity("SELECT e1.x, e2.x FROM e e1, e e2 WHERE e1.y (+) = e2.y") @@ -347,7 +369,7 @@ FROM warehouses, XMLTABLE( FROM XMLTABLE( 'ROWSET/ROW' PASSING - dbms_xmlgen.GETXMLTYPE('SELECT table_name, column_name, data_default FROM user_tab_columns') + dbms_xmlgen.getxmltype('SELECT table_name, column_name, data_default FROM user_tab_columns') COLUMNS table_name VARCHAR2(128) PATH '*[1]', column_name VARCHAR2(128) PATH '*[2]', |