Jonathan Keane created ARROW-13364:
--------------------------------------

             Summary: [C++] Should NaN comparison return false or NaN/NA?
                 Key: ARROW-13364
                 URL: https://issues.apache.org/jira/browse/ARROW-13364
             Project: Apache Arrow
          Issue Type: Improvement
          Components: C++
            Reporter: Jonathan Keane


In working on ARROW-12964 we ran into some corner behaviors with {{NaN}} that 
don't match our (and R's) expectations. It appears that (any?) comparison with 
`NaN` results in false:

{code:r}
> Scalar$create(NaN) > 5
Scalar
false
{code} 

though at least in R this would result in an NA value:
{code:r}
> NaN > 5
[1] NA
{code}

The current behavior _does_ match numpy's behavior:

{code:python}
>>> np.nan > 5
False
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to