itholic commented on code in PR #41211:
URL: https://github.com/apache/spark/pull/41211#discussion_r1197455833


##########
python/pyspark/pandas/tests/indexes/test_datetime.py:
##########
@@ -101,6 +99,28 @@ def test_properties(self):
                 self.assert_eq(psidx.day_of_year, pidx.day_of_year)
                 self.assert_eq(psidx.day_of_week, pidx.day_of_week)
 
+        if LooseVersion(pd.__version__) >= LooseVersion("2.0.0"):
+            # TODO(SPARK-42617): Support isocalendar.week and replace it.
+            expected_results = [
+                ps.Index([1]),
+                ps.Index([1, 1, 13]),
+                ps.Index([52, 52, 1]),
+                ps.Index([52, 52, 52]),
+                ps.Index([52, 52, 52]),
+                ps.Index([52, 52, 52]),
+                ps.Index([52, 52, 52]),
+                ps.Index([52, 52, 52]),
+                ps.Index([52, 1, 2]),
+                ps.Index([13, 26, 39]),
+            ]
+            for psidx, expected_result in zip(self.psidxs, expected_results):
+                self.assert_eq(psidx.week, expected_result)
+                self.assert_eq(psidx.weekofyear, expected_result)
+        else:
+            for psidx, pidx in self.idx_pairs:
+                self.assert_eq(psidx.week, pidx.week)
+                self.assert_eq(psidx.weekofyear, pidx.weekofyear)

Review Comment:
   FYI: I will address the skipped tests like this, since we can't change the 
behavior for now.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to