Yikun opened a new pull request, #37078:
URL: https://github.com/apache/spark/pull/37078

   ### What changes were proposed in this pull request?
   This PR fix the wrong aliases in `__array_ufunc__`
   
   ### Why are the changes needed?
   When running test with numpy 1.23.0 (current latest), hit a bug: 
`NotImplementedError: pandas-on-Spark objects currently do not support <ufunc 
'divide'>.`
   
   In `__array_ufunc__` we first call `maybe_dispatch_ufunc_to_dunder_op` to 
try dunder methods first, and then we try pyspark API. 
`maybe_dispatch_ufunc_to_dunder_op` is from pandas code.
   
   pandas fix a bug 
https://github.com/pandas-dev/pandas/pull/44822#issuecomment-991166419 
https://github.com/pandas-dev/pandas/pull/44822/commits/206b2496bc6f6aa025cb26cb42f52abeec227741
 when upgrade to numpy 1.23.0, we need to also sync this.
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   - Current CI passed
   - The exsiting UT `test_series_datetime` already cover this, I also test it 
in my local env with 1.23.0
   ```shell
   pip install "numpy==1.23.0"
   python/run-tests --testnames 'pyspark.pandas.tests.test_series_datetime 
SeriesDateTimeTest.test_arithmetic_op_exceptions'
   ```


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