Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
4.0.0
-
None
Description
> is.nan(NA_real_) [1] FALSE > as.vector(is.nan(Scalar$create(NA_real_))) [1] NA
There 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.
Attachments
Issue Links
- is related to
-
ARROW-13363 [R] is.nan() errors on non-floating point data
-
- Resolved
-
-
ARROW-13366 [C++] Add option to is_nan kernel to return true on null
-
- Open
-
- relates to
-
ARROW-12055 [R] is.na() evaluates to FALSE on Arrow NaN values
-
- Resolved
-