Jefffrey commented on code in PR #18485:
URL: https://github.com/apache/datafusion/pull/18485#discussion_r2493004970


##########
datafusion/spark/src/function/array/spark_array.rs:
##########
@@ -92,21 +92,6 @@ impl ScalarUDFImpl for SparkArray {
         ))))
     }
 
-    fn return_field_from_args(&self, args: ReturnFieldArgs) -> 
Result<FieldRef> {
-        let data_types = args
-            .arg_fields
-            .iter()
-            .map(|f| f.data_type())
-            .cloned()
-            .collect::<Vec<_>>();
-        let return_type = self.return_type(&data_types)?;
-        Ok(Arc::new(Field::new(
-            "this_field_name_is_irrelevant",
-            return_type,
-            false,
-        )))
-    }

Review Comment:
   I'm not familiar with the degree to which DataFusion uses the nullability 
information of a field, so I can't say what the impact would be. But I assume 
it's better to be more informative where possible, e.g. we know make array 
function can't ever return a null so it's good if we can preserve that 
information, especially since the Spark version already had it.



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

Reply via email to