Light-City opened a new pull request, #37321: URL: https://github.com/apache/arrow/pull/37321
### Rationale for this change Ordinary comparison operators yield null (signifying “unknown”), not true or false, when either input is null. For example, 7 = NULL yields null, as does 7 <> NULL. When this behavior is not suitable, use the IS [ NOT ] DISTINCT FROM predicates: a IS DISTINCT FROM b or a IS NOT DISTINCT FROM b a IS DISTINCT b is equal to (a != b) or (b is null and a is not null) or (a is null and b is not null). We use coalesce to ensure is not distinct semantics, so we can use not_(is_distinct(lhs, rhs)) directly. ### What changes are included in this PR? expression.cc expression.h expression_test.cc ### Are these changes tested? yes, expression_test.cc two test label. - IsDistinct - IsNotDistinct ### Are there any user-facing changes? yes, sql is: ``` select * from test where a is distinct from b; ``` or ``` select * from test where a is not distinct from b; ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
