summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_tsql.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-04-07 12:35:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-04-07 12:35:01 +0000
commit58c11f70074708344e433080e47621091a6dcd84 (patch)
tree2589166e0e58be4947e07a956d26efa497bccaf2 /tests/dialects/test_tsql.py
parentAdding upstream version 11.4.5. (diff)
downloadsqlglot-58c11f70074708344e433080e47621091a6dcd84.tar.xz
sqlglot-58c11f70074708344e433080e47621091a6dcd84.zip
Adding upstream version 11.5.2.upstream/11.5.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_tsql.py')
-rw-r--r--tests/dialects/test_tsql.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/dialects/test_tsql.py b/tests/dialects/test_tsql.py
index 60867be..d9ee4ae 100644
--- a/tests/dialects/test_tsql.py
+++ b/tests/dialects/test_tsql.py
@@ -547,11 +547,11 @@ WHERE
def test_string(self):
self.validate_all(
"SELECT N'test'",
- write={"spark": "SELECT N'test'"},
+ write={"spark": "SELECT 'test'"},
)
self.validate_all(
"SELECT n'test'",
- write={"spark": "SELECT N'test'"},
+ write={"spark": "SELECT 'test'"},
)
self.validate_all(
"SELECT '''test'''",
@@ -621,3 +621,13 @@ WHERE
"tsql": """SELECT "x" FROM "a"."b" FOR SYSTEM_TIME ALL AS alias""",
},
)
+
+ def test_current_user(self):
+ self.validate_all(
+ "SUSER_NAME()",
+ write={"spark": "CURRENT_USER()"},
+ )
+ self.validate_all(
+ "SUSER_SNAME()",
+ write={"spark": "CURRENT_USER()"},
+ )