summaryrefslogtreecommitdiffstats
path: root/tests/test_transpile.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-07 11:39:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-07 11:39:48 +0000
commitf73e9af131151f1e058446361c35b05c4c90bf10 (patch)
treeed425b89f12d3f5e4709290bdc03d876f365bc97 /tests/test_transpile.py
parentReleasing debian version 17.12.0-1. (diff)
downloadsqlglot-f73e9af131151f1e058446361c35b05c4c90bf10.tar.xz
sqlglot-f73e9af131151f1e058446361c35b05c4c90bf10.zip
Merging upstream version 18.2.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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")