alamb commented on code in PR #7995:
URL: https://github.com/apache/arrow-datafusion/pull/7995#discussion_r1380730813


##########
datafusion/optimizer/src/analyzer/type_coercion.rs:
##########
@@ -579,26 +580,51 @@ fn coerce_arguments_for_fun(
             .collect::<Result<Vec<_>>>()?;
     }
 
+    // Converting `Null` to Int32(None) to avoid handling `Null` in array 
functions

Review Comment:
   It seems very strange to me that there are three special cases for `if *fun 
== BuiltinScalarFunction::MakeArray {` that all do similar things 🤔 



##########
datafusion/optimizer/src/analyzer/type_coercion.rs:
##########
@@ -579,26 +580,51 @@ fn coerce_arguments_for_fun(
             .collect::<Result<Vec<_>>>()?;
     }
 
+    // Converting `Null` to Int32(None) to avoid handling `Null` in array 
functions

Review Comment:
   I feel like the fact this is special casing NULLs when nothing else in 
DataFusion needs to do the same, is an indication something is not quite right 
with this architecture. Is there any way we can remove these special cases?



##########
datafusion/optimizer/src/analyzer/type_coercion.rs:
##########
@@ -579,26 +580,51 @@ fn coerce_arguments_for_fun(
             .collect::<Result<Vec<_>>>()?;
     }
 
+    // Converting `Null` to Int32(None) to avoid handling `Null` in array 
functions

Review Comment:
   It seems very strange to me that there are three special cases for `if *fun 
== BuiltinScalarFunction::MakeArray {` that all do similar things 🤔 



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