summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_teradata.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dialects/test_teradata.py')
-rw-r--r--tests/dialects/test_teradata.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/dialects/test_teradata.py b/tests/dialects/test_teradata.py
index 14703c4..85d4ebf 100644
--- a/tests/dialects/test_teradata.py
+++ b/tests/dialects/test_teradata.py
@@ -147,6 +147,9 @@ class TestTeradata(Validator):
def test_mod(self):
self.validate_all("a MOD b", write={"teradata": "a MOD b", "mysql": "a % b"})
+ def test_power(self):
+ self.validate_all("a ** b", write={"teradata": "a ** b", "mysql": "POWER(a, b)"})
+
def test_abbrev(self):
self.validate_identity("a LT b", "a < b")
self.validate_identity("a LE b", "a <= b")
@@ -191,3 +194,14 @@ class TestTeradata(Validator):
},
)
self.validate_identity("CAST('1992-01' AS FORMAT 'YYYY-DD')")
+
+ self.validate_all(
+ "TRYCAST('-2.5' AS DECIMAL(5, 2))",
+ read={
+ "snowflake": "TRY_CAST('-2.5' AS DECIMAL(5, 2))",
+ },
+ write={
+ "snowflake": "TRY_CAST('-2.5' AS DECIMAL(5, 2))",
+ "teradata": "TRYCAST('-2.5' AS DECIMAL(5, 2))",
+ },
+ )