alamb commented on a change in pull request #1181:
URL: https://github.com/apache/arrow-datafusion/pull/1181#discussion_r737677554



##########
File path: datafusion/src/physical_plan/expressions/binary.rs
##########
@@ -568,14 +592,42 @@ impl PhysicalExpr for BinaryExpr {
 
         // if both arrays or both literals - extract arrays and continue 
execution
         let (left, right) = (
-            left_value.into_array(batch.num_rows()),
-            right_value.into_array(batch.num_rows()),
+            left_value.into_array(num_rows),
+            right_value.into_array(num_rows),
         );
         self.evaluate_with_resolved_args(left, &left_data_type, right, 
&right_data_type)
             .map(|a| ColumnarValue::Array(a))
     }
 }
 
+/// if value represents a null literal (`ScalarValue::*(None)`) return

Review comment:
       Technically a `Null` literal can be cast to any other type. It would be 
cool to properly support`DataType::Null` throughout DataFusion (I spent a while 
trying to do this, but found many places that are not prepared to handle it -- 
like arrow cast kernel)




-- 
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]


Reply via email to