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

Daniël Heres commented on ARROW-11973:
--------------------------------------

In PostgreSQL (the dialect we target) the default is what we currently have 
implemented.

SELECT TRUE AND NULL;
> NULL
SELECT TRUE OR NULL;
> NULL

I am all for having optionally different implementations in Arrow (for 
supporting different semantics / systems) though - but for DataFusion side it 
makes sense to think about what kind of behavior we want?
I think kleene could be somewhat more efficient in some cases - as it could 
short-circuit / doesn't need to check for possible NULLs.

> [Rust] Boolean AND/OR kernels should follow sql behaviour regarding null 
> values
> -------------------------------------------------------------------------------
>
>                 Key: ARROW-11973
>                 URL: https://issues.apache.org/jira/browse/ARROW-11973
>             Project: Apache Arrow
>          Issue Type: New Feature
>          Components: Rust, Rust - DataFusion
>    Affects Versions: 3.0.0
>            Reporter: Jörn Horstmann
>            Assignee: Jörn Horstmann
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The AND/OR boolean kernels currently have the same null handling as other 
> binary expressions, if either the left or right input is NULL then the result 
> will be NULL. The standard sql behaviour is different:
> OR: If one input is TRUE then the result will be TRUE even if the other input 
> is NULL
> AND: If one input is FALSE then the result will be FALSE regardless of the 
> other input
> This behaviour makes sense if you think of NULL as meaning UNKNOWN.



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

Reply via email to