Yikun commented on a change in pull request #34737:
URL: https://github.com/apache/spark/pull/34737#discussion_r758528765



##########
File path: python/pyspark/pandas/tests/test_series.py
##########
@@ -2115,6 +2115,23 @@ def test_asof(self):
         self.assert_eq(psser.asof("2014-01-02"), pser.asof("2014-01-02"))
         self.assert_eq(repr(psser.asof("1999-01-02")), 
repr(pser.asof("1999-01-02")))
 
+        # SPARK-37482: Skip check monotonic increasing for Series.asof with 
'compute.eager_check'
+        pser = pd.Series([1, 2, np.nan, 4], index=[10, 30, 20, 40])
+        psser = ps.from_pandas(pser)
+
+        with ps.option_context("compute.eager_check", False):
+            self.assert_eq(psser.asof(20), 1.0)
+        with ps.option_context("compute.eager_check", True):
+            self.assertRaises(ValueError, lambda: psser.asof(20))
+
+        pser = pd.Series([1, 2, np.nan, 4], index=[40, 30, 20, 10])
+        psser = ps.from_pandas(pser)
+
+        with ps.option_context("compute.eager_check", False):
+            self.assert_eq(psser.asof(20), 4.0)
+        with ps.option_context("compute.eager_check", True):

Review comment:
       Do we really need to do the compute.eager_check=True test?  maybe it can 
be merged into 2105, because eager_check is True already by default.




-- 
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