From 99980f928b5b7be237d108266072e51aa3bb354e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 8 Feb 2023 05:14:30 +0100 Subject: Adding upstream version 10.6.3. Signed-off-by: Daniel Baumann --- tests/test_transpile.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests/test_transpile.py') 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"): -- cgit v1.2.3