You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "tustvold (via GitHub)" <gi...@apache.org> on 2023/01/23 20:10:30 UTC
[GitHub] [arrow-rs] tustvold commented on issue #3589: Nullif of NULL Predicate is not NULL
tustvold commented on issue #3589:
URL: https://github.com/apache/arrow-rs/issues/3589#issuecomment-1400913675
Looking at how this is typically used I realise the current logic is correct. In particular the common pattern is
```
let cond_array = eq_dyn(lhs, rhs)?;
// Now, invoke nullif on the result
let array = nullif(lhs, as_boolean_array(&cond_array)?)?;
```
In particular if `lhs` or `rhs` is null, `cond_array` will also be null.
The result should only be `null` if `lhs` is null, which is the case if `NULL` passed to `nullif` preserves the nullability of `lhs` in the event of `rhs` being null.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org