comphead commented on code in PR #11697:
URL: https://github.com/apache/datafusion/pull/11697#discussion_r1695412446
##########
datafusion/functions/src/core/nullif.rs:
##########
@@ -122,8 +121,13 @@ fn nullif_func(args: &[ColumnarValue]) ->
Result<ColumnarValue> {
Ok(ColumnarValue::Array(array))
}
(ColumnarValue::Scalar(lhs), ColumnarValue::Array(rhs)) => {
- let lhs = lhs.to_array_of_size(rhs.len())?;
- let array = nullif(&lhs, &eq(&lhs, &rhs)?)?;
+ let lhs_s = lhs.to_scalar()?;
+ let lhs_a = lhs.to_array_of_size(rhs.len())?;
+ let array = nullif(
+ // nullif in arrow-select dodes not support Datum, so we need
to convert to array
Review Comment:
```suggestion
// nullif in arrow-select does not support Datum, so we need
to convert to array
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]