Yikun commented on a change in pull request #34314:
URL: https://github.com/apache/spark/pull/34314#discussion_r733376501
##########
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:
```suggestion
if get_option("compute.eager_check") and index_ops.hasnans:
```
So, final code looks like above, If we don't enable `compute.eager_check`
will not do data validation, right?
And I prefer to enable this check in separate patch to keep consist behavior
with other ops, and then add the eager_check together at sometime.
--
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]