Jefffrey commented on code in PR #18485:
URL: https://github.com/apache/datafusion/pull/18485#discussion_r2492552432
##########
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 actually thinking maybe we keep this and just fold `return_type` logic
into here; specifically because it returns `false` for the nullability whereas
default implementation for `return_field_from_args` returns `true` for
nullability.
- We'd still need to implement `return_type` to satisfy trait, but we can
have it return an internal err, see:
https://github.com/apache/datafusion/blob/b52a81db70002489c20bc78dceb33aea2edf44b7/datafusion/functions-nested/src/map_values.rs#L95-L112
--
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]