diff options
Diffstat (limited to 'tests/dialects/test_tsql.py')
-rw-r--r-- | tests/dialects/test_tsql.py | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/tests/dialects/test_tsql.py b/tests/dialects/test_tsql.py index afdd48a..e4c6e60 100644 --- a/tests/dialects/test_tsql.py +++ b/tests/dialects/test_tsql.py @@ -371,13 +371,19 @@ class TestTSQL(Validator): self.validate_all( "SELECT t.x, y.z FROM x CROSS APPLY tvfTest(t.x)y(z)", write={ - "spark": "SELECT t.x, y.z FROM x JOIN LATERAL TVFTEST(t.x) y AS z", + "spark": "SELECT t.x, y.z FROM x JOIN LATERAL TVFTEST(t.x) AS y(z)", }, ) self.validate_all( "SELECT t.x, y.z FROM x OUTER APPLY tvfTest(t.x)y(z)", write={ - "spark": "SELECT t.x, y.z FROM x LEFT JOIN LATERAL TVFTEST(t.x) y AS z", + "spark": "SELECT t.x, y.z FROM x LEFT JOIN LATERAL TVFTEST(t.x) AS y(z)", + }, + ) + self.validate_all( + "SELECT t.x, y.z FROM x OUTER APPLY a.b.tvfTest(t.x)y(z)", + write={ + "spark": "SELECT t.x, y.z FROM x LEFT JOIN LATERAL a.b.TVFTEST(t.x) AS y(z)", }, ) @@ -421,3 +427,17 @@ class TestTSQL(Validator): self.validate_all( "SELECT FORMAT(num_col, 'c')", write={"spark": "SELECT FORMAT_NUMBER(num_col, 'c')"} ) + + def test_string(self): + self.validate_all( + "SELECT N'test'", + write={"spark": "SELECT 'test'"}, + ) + self.validate_all( + "SELECT n'test'", + write={"spark": "SELECT 'test'"}, + ) + self.validate_all( + "SELECT '''test'''", + write={"spark": r"SELECT '\'test\''"}, + ) |