You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Antoine Pitrou (Jira)" <ji...@apache.org> on 2022/06/02 07:59:00 UTC

[jira] [Commented] (ARROW-16718) [C++] Implement is_distinct_from and is_not_distinct_from kernels

    [ https://issues.apache.org/jira/browse/ARROW-16718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17545326#comment-17545326 ] 

Antoine Pitrou commented on ARROW-16718:
----------------------------------------

This could be an option to the comparison kernels. cc [~westonpace]

> [C++] Implement is_distinct_from and is_not_distinct_from kernels
> -----------------------------------------------------------------
>
>                 Key: ARROW-16718
>                 URL: https://issues.apache.org/jira/browse/ARROW-16718
>             Project: Apache Arrow
>          Issue Type: New Feature
>          Components: C++
>            Reporter: Ian Cook
>            Priority: Minor
>
> Some SQL engines have the comparison operators {{IS DISTINCT FROM}} and {{{}IS NOT DISTINCT FROM{}}}. These are so-called {_}null-safe comparison operators{_}.
> As explained in the Impala docs:
> {quote}The IS DISTINCT FROM operator, and its converse the IS NOT DISTINCT FROM operator, test whether or not values are identical. IS NOT DISTINCT FROM is similar to the = operator, and IS DISTINCT FROM is similar to the != operator, except that NULL values are treated as identical. Therefore, IS NOT DISTINCT FROM returns true rather than NULL, and IS DISTINCT FROM returns false rather than NULL, when comparing two NULL values. If one of the values being compared is NULL and the other is not, IS DISTINCT FROM returns true and IS NOT DISTINCT FROM returns false, again instead of returning NULL in both cases.
> {quote}
> It would be a nice convenience to have these implemented as kernels in Arrow.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)