alamb commented on code in PR #8054:
URL: https://github.com/apache/arrow-datafusion/pull/8054#discussion_r1383164675
##########
datafusion/physical-expr/src/array_expressions.rs:
##########
@@ -2763,6 +2789,52 @@ mod tests {
);
}
+ #[test]
+ fn test_array_replace_with_null() {
+ // ([3, 1, NULL, 3], 3, 4, 2) => [4, 1, NULL, 4] NULL not
matched
+ // ([3, 1, NULL, 3], NULL, 5, 2) => [3, 1, NULL, 3] NULL not
replaced (not eq)
Review Comment:
I think it is because in SQL, `NULL = NULL` is *NOT* `true` like you might
expect, but is actually `NULL`
If we want the `NULL = NULL` = true behavior, we could use the
`not_distinct` kernel instead:
https://docs.rs/arrow/latest/arrow/compute/kernels/cmp/fn.not_distinct.html
--
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]