alamb commented on code in PR #11697:
URL: https://github.com/apache/datafusion/pull/11697#discussion_r1703247681
##########
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())?;
Review Comment:
I think this is a good improvement regardless as it makes the DataFusion
code follow the pattern so it can take advantage of the `Datum` special case
if/when it is implemented.
Any chance you have a moment to file a ticket upstream in arrow-rs? If not,
I will do so
--
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]