Adding upstream version 20.1.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
6a89523da4
commit
5bd573dda1
127 changed files with 73384 additions and 73067 deletions
|
@ -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(
|
||||
|
|
|
@ -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"})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue