diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-01-17 10:32:16 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-01-17 10:32:16 +0000 |
commit | d3bb537b2b73788ba06bf4158f473ecc5bb556cc (patch) | |
tree | 6c1b280de128c7bf77baaa258560a1f39a4e15c7 /tests/dataframe/unit/test_window.py | |
parent | Releasing debian version 10.4.2-1. (diff) | |
download | sqlglot-d3bb537b2b73788ba06bf4158f473ecc5bb556cc.tar.xz sqlglot-d3bb537b2b73788ba06bf4158f473ecc5bb556cc.zip |
Merging upstream version 10.5.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/dataframe/unit/test_window.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/dataframe/unit/test_window.py b/tests/dataframe/unit/test_window.py index 70a868a..45d736f 100644 --- a/tests/dataframe/unit/test_window.py +++ b/tests/dataframe/unit/test_window.py @@ -15,11 +15,11 @@ class TestDataframeWindow(unittest.TestCase): def test_window_spec_rows_between(self): rows_between = WindowSpec().rowsBetween(3, 5) - self.assertEqual("OVER ( ROWS BETWEEN 3 PRECEDING AND 5 FOLLOWING)", rows_between.sql()) + self.assertEqual("OVER (ROWS BETWEEN 3 PRECEDING AND 5 FOLLOWING)", rows_between.sql()) def test_window_spec_range_between(self): range_between = WindowSpec().rangeBetween(3, 5) - self.assertEqual("OVER ( RANGE BETWEEN 3 PRECEDING AND 5 FOLLOWING)", range_between.sql()) + self.assertEqual("OVER (RANGE BETWEEN 3 PRECEDING AND 5 FOLLOWING)", range_between.sql()) def test_window_partition_by(self): partition_by = Window.partitionBy(F.col("cola"), F.col("colb")) @@ -31,46 +31,46 @@ class TestDataframeWindow(unittest.TestCase): def test_window_rows_between(self): rows_between = Window.rowsBetween(3, 5) - self.assertEqual("OVER ( ROWS BETWEEN 3 PRECEDING AND 5 FOLLOWING)", rows_between.sql()) + self.assertEqual("OVER (ROWS BETWEEN 3 PRECEDING AND 5 FOLLOWING)", rows_between.sql()) def test_window_range_between(self): range_between = Window.rangeBetween(3, 5) - self.assertEqual("OVER ( RANGE BETWEEN 3 PRECEDING AND 5 FOLLOWING)", range_between.sql()) + self.assertEqual("OVER (RANGE BETWEEN 3 PRECEDING AND 5 FOLLOWING)", range_between.sql()) def test_window_rows_unbounded(self): rows_between_unbounded_start = Window.rowsBetween(Window.unboundedPreceding, 2) self.assertEqual( - "OVER ( ROWS BETWEEN UNBOUNDED PRECEDING AND 2 FOLLOWING)", + "OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND 2 FOLLOWING)", rows_between_unbounded_start.sql(), ) rows_between_unbounded_end = Window.rowsBetween(1, Window.unboundedFollowing) self.assertEqual( - "OVER ( ROWS BETWEEN 1 PRECEDING AND UNBOUNDED FOLLOWING)", + "OVER (ROWS BETWEEN 1 PRECEDING AND UNBOUNDED FOLLOWING)", rows_between_unbounded_end.sql(), ) rows_between_unbounded_both = Window.rowsBetween( Window.unboundedPreceding, Window.unboundedFollowing ) self.assertEqual( - "OVER ( ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)", + "OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)", rows_between_unbounded_both.sql(), ) def test_window_range_unbounded(self): range_between_unbounded_start = Window.rangeBetween(Window.unboundedPreceding, 2) self.assertEqual( - "OVER ( RANGE BETWEEN UNBOUNDED PRECEDING AND 2 FOLLOWING)", + "OVER (RANGE BETWEEN UNBOUNDED PRECEDING AND 2 FOLLOWING)", range_between_unbounded_start.sql(), ) range_between_unbounded_end = Window.rangeBetween(1, Window.unboundedFollowing) self.assertEqual( - "OVER ( RANGE BETWEEN 1 PRECEDING AND UNBOUNDED FOLLOWING)", + "OVER (RANGE BETWEEN 1 PRECEDING AND UNBOUNDED FOLLOWING)", range_between_unbounded_end.sql(), ) range_between_unbounded_both = Window.rangeBetween( Window.unboundedPreceding, Window.unboundedFollowing ) self.assertEqual( - "OVER ( RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)", + "OVER (RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)", range_between_unbounded_both.sql(), ) |