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


   ### What changes were proposed in this pull request?
   This patch has changes as below to follow the pandas behavior:
   - **Add nan value process in _non_fractional_astype**: Follow the pandas 
[to_string](https://github.com/pandas-dev/pandas/blob/0a9f9eed3e3eb7d5fa23cbc588e78b9bef915a89/pandas/core/series.py#L1486)
 covert method, it should be `"NaN"` rather than `str(np.nan)`(`"nan"`), which 
is covered by `self.assert_eq(pser.astype(str), psser.astype(str))`.
   - **Add null value process in rpow**, which is covered by `def 
test_rpow(self)`
   - **Add index_ops.hasnans in `astype`**, which is covered by `test_astype`.
   
   This patch also move `numeric_w_nan_pdf` into `numeric_pdf`, that means all 
float_nan/decimal_nan separated test case have been cleaned up and merged into 
numeric test.
   
   ### Why are the changes needed?
   Follow the pandas behavior
   
   ### Does this PR introduce _any_ user-facing change?
   Yes, correct the null value result to follow the pandas behavior
   
   
   ### How was this patch tested?
   1. ut to cover all changes
   2. Passed all python test case with pandas v1.1.x
   3. Passed all python test case with pandas v1.2.x


-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to