From c66e4a33e1a07c439f03fe47f146a6c6482bf6df Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 8 Feb 2024 06:38:42 +0100 Subject: Merging upstream version 21.0.1. Signed-off-by: Daniel Baumann --- tests/dataframe/unit/test_functions.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'tests/dataframe/unit/test_functions.py') diff --git a/tests/dataframe/unit/test_functions.py b/tests/dataframe/unit/test_functions.py index c845441..24904b7 100644 --- a/tests/dataframe/unit/test_functions.py +++ b/tests/dataframe/unit/test_functions.py @@ -528,7 +528,7 @@ class TestFunctions(unittest.TestCase): col = SF.first(SF.col("cola")) self.assertEqual("FIRST(cola)", col.sql()) ignore_nulls = SF.first("cola", True) - self.assertEqual("FIRST(cola, TRUE)", ignore_nulls.sql()) + self.assertEqual("FIRST(cola) IGNORE NULLS", ignore_nulls.sql()) def test_grouping_id(self): col_str = SF.grouping_id("cola", "colb") @@ -562,7 +562,7 @@ class TestFunctions(unittest.TestCase): col = SF.last(SF.col("cola")) self.assertEqual("LAST(cola)", col.sql()) ignore_nulls = SF.last("cola", True) - self.assertEqual("LAST(cola, TRUE)", ignore_nulls.sql()) + self.assertEqual("LAST(cola) IGNORE NULLS", ignore_nulls.sql()) def test_monotonically_increasing_id(self): col = SF.monotonically_increasing_id() @@ -713,8 +713,10 @@ class TestFunctions(unittest.TestCase): self.assertEqual("NTH_VALUE(cola, 3)", col.sql()) col_no_offset = SF.nth_value("cola") self.assertEqual("NTH_VALUE(cola)", col_no_offset.sql()) - with self.assertRaises(NotImplementedError): - SF.nth_value("cola", ignoreNulls=True) + + self.assertEqual( + "NTH_VALUE(cola) IGNORE NULLS", SF.nth_value("cola", ignoreNulls=True).sql() + ) def test_ntile(self): col = SF.ntile(2) -- cgit v1.2.3