summaryrefslogtreecommitdiffstats
path: root/tests/test_transpile.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-08 04:14:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-08 04:14:34 +0000
commit8bec55350caa5c760d8b7e7e2d0ba6c77a32bc71 (patch)
treed6259e0351c7b4a50d528122513d533bb582eb2b /tests/test_transpile.py
parentReleasing debian version 10.6.0-1. (diff)
downloadsqlglot-8bec55350caa5c760d8b7e7e2d0ba6c77a32bc71.tar.xz
sqlglot-8bec55350caa5c760d8b7e7e2d0ba6c77a32bc71.zip
Merging upstream version 10.6.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_transpile.py')
-rw-r--r--tests/test_transpile.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_transpile.py b/tests/test_transpile.py
index 3e094f5..c0d518d 100644
--- a/tests/test_transpile.py
+++ b/tests/test_transpile.py
@@ -326,12 +326,12 @@ FROM bar /* comment 5 */, tbl /* comment 6 */""",
self.validate("TIME_TO_UNIX(x)", "EPOCH(x)", write="duckdb")
self.validate(
"UNIX_TO_STR(123, 'y')",
- "STRFTIME(TO_TIMESTAMP(CAST(123 AS BIGINT)), 'y')",
+ "STRFTIME(TO_TIMESTAMP(123), 'y')",
write="duckdb",
)
self.validate(
"UNIX_TO_TIME(123)",
- "TO_TIMESTAMP(CAST(123 AS BIGINT))",
+ "TO_TIMESTAMP(123)",
write="duckdb",
)
@@ -426,6 +426,9 @@ FROM bar /* comment 5 */, tbl /* comment 6 */""",
mock_logger.warning.assert_any_call("Applying array index offset (%s)", 1)
mock_logger.warning.assert_any_call("Applying array index offset (%s)", -1)
+ def test_identify_lambda(self):
+ self.validate("x(y -> y)", 'X("y" -> "y")', identify=True)
+
def test_identity(self):
self.assertEqual(transpile("")[0], "")
for sql in load_sql_fixtures("identity.sql"):