summaryrefslogtreecommitdiffstats
path: root/tests/test_transpile.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_transpile.py')
-rw-r--r--tests/test_transpile.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_transpile.py b/tests/test_transpile.py
index e58ed86..2b51be2 100644
--- a/tests/test_transpile.py
+++ b/tests/test_transpile.py
@@ -393,11 +393,13 @@ LEFT OUTER JOIN b""",
self.validate("x::INT y", "CAST(x AS INT) AS y")
self.validate("x::INT AS y", "CAST(x AS INT) AS y")
self.validate("x::INT::BOOLEAN", "CAST(CAST(x AS INT) AS BOOLEAN)")
+ self.validate("interval::int", "CAST(interval AS INT)")
+ self.validate("x::user_defined_type", "CAST(x AS user_defined_type)")
self.validate("CAST(x::INT AS BOOLEAN)", "CAST(CAST(x AS INT) AS BOOLEAN)")
self.validate("CAST(x AS INT)::BOOLEAN", "CAST(CAST(x AS INT) AS BOOLEAN)")
with self.assertRaises(ParseError):
- transpile("x::z")
+ transpile("x::z", read="duckdb")
def test_not_range(self):
self.validate("a NOT LIKE b", "NOT a LIKE b")