-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Description
> is.nan(NA_real_)
[1] FALSE
> as.vector(is.nan(Scalar$create(NA_real_)))
[1] NAThere is a discrepancy here between the FALSE result in R and the null result in Arrow (which results in NA_logical_ when converted to an R vector).
I don't think the is_nan C++ kernel should change here because this is just a quirk of R. For example, NumPy and pandas is consistent with the Arrow C++:
> np.isnan(pd.NA)
<NA>We could maybe consider adding a boolean option to the is_nan C++ kernel to control whether to consider nulls as NaN.
Reporter: Ian Cook / @ianmcook
Assignee: Ian Cook / @ianmcook
Related issues:
- [R] is.na() evaluates to FALSE on Arrow NaN values (relates to)
- [R] is.nan() errors on non-floating point data (is related to)
- [C++] Add option to is_nan kernel to return true on null (is related to)
Note: This issue was originally created as ARROW-12850. Please see the migration documentation for further details.