From 02df6cdb000c8dbf739abda2af321a4f90d1b059 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 10 Dec 2023 11:45:55 +0100 Subject: Adding upstream version 20.1.0. Signed-off-by: Daniel Baumann --- tests/dataframe/unit/test_column.py | 2 +- tests/dataframe/unit/test_functions.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/dataframe/unit') diff --git a/tests/dataframe/unit/test_column.py b/tests/dataframe/unit/test_column.py index 117789e..7a12808 100644 --- a/tests/dataframe/unit/test_column.py +++ b/tests/dataframe/unit/test_column.py @@ -146,7 +146,7 @@ class TestDataframeColumn(unittest.TestCase): self.assertEqual("cola BETWEEN 1 AND 3", F.col("cola").between(1, 3).sql()) self.assertEqual("cola BETWEEN 10.1 AND 12.1", F.col("cola").between(10.1, 12.1).sql()) self.assertEqual( - "cola BETWEEN TO_DATE('2022-01-01') AND TO_DATE('2022-03-01')", + "cola BETWEEN CAST('2022-01-01' AS DATE) AND CAST('2022-03-01' AS DATE)", F.col("cola").between(datetime.date(2022, 1, 1), datetime.date(2022, 3, 1)).sql(), ) self.assertEqual( diff --git a/tests/dataframe/unit/test_functions.py b/tests/dataframe/unit/test_functions.py index 586b8fc..54b327c 100644 --- a/tests/dataframe/unit/test_functions.py +++ b/tests/dataframe/unit/test_functions.py @@ -27,7 +27,7 @@ class TestFunctions(unittest.TestCase): test_null = SF.lit(None) self.assertEqual("NULL", test_null.sql()) test_date = SF.lit(datetime.date(2022, 1, 1)) - self.assertEqual("TO_DATE('2022-01-01')", test_date.sql()) + self.assertEqual("CAST('2022-01-01' AS DATE)", test_date.sql()) test_datetime = SF.lit(datetime.datetime(2022, 1, 1, 1, 1, 1)) self.assertEqual("CAST('2022-01-01T01:01:01+00:00' AS TIMESTAMP)", test_datetime.sql()) test_dict = SF.lit({"cola": 1, "colb": "test"}) @@ -49,7 +49,7 @@ class TestFunctions(unittest.TestCase): test_array = SF.col([1, 2, "3"]) self.assertEqual("ARRAY(1, 2, '3')", test_array.sql()) test_date = SF.col(datetime.date(2022, 1, 1)) - self.assertEqual("TO_DATE('2022-01-01')", test_date.sql()) + self.assertEqual("CAST('2022-01-01' AS DATE)", test_date.sql()) test_datetime = SF.col(datetime.datetime(2022, 1, 1, 1, 1, 1)) self.assertEqual("CAST('2022-01-01T01:01:01+00:00' AS TIMESTAMP)", test_datetime.sql()) test_dict = SF.col({"cola": 1, "colb": "test"}) -- cgit v1.2.3