HyukjinKwon commented on a change in pull request #34314:
URL: https://github.com/apache/spark/pull/34314#discussion_r731460743
##########
File path: python/pyspark/pandas/data_type_ops/num_ops.py
##########
@@ -447,10 +447,29 @@ def nan_to_null(self, index_ops: IndexOpsLike) ->
IndexOpsLike:
return index_ops.copy()
def astype(self, index_ops: IndexOpsLike, dtype: Union[str, type, Dtype])
-> IndexOpsLike:
- # TODO(SPARK-36230): check index_ops.hasnans after fixing SPARK-36230
dtype, spark_type = pandas_on_spark_type(dtype)
+ if is_integer_dtype(dtype) and not isinstance(dtype, extension_dtypes):
+ if index_ops.hasnans:
Review comment:
@dchvn for example, we can apply the configuration
(https://github.com/apache/spark/pull/34281) here too I believe.
--
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]