jizezhang commented on code in PR #18485:
URL: https://github.com/apache/datafusion/pull/18485#discussion_r2492843550
##########
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:
Ah thanks for pointing it out, will raise a revision.
For my learning, `make_array` implements `return_type` but not
`return_field_from_args`,
https://github.com/apache/datafusion/blob/b52a81db70002489c20bc78dceb33aea2edf44b7/datafusion/functions-nested/src/make_array.rs#L105
which means it uses default implementation of `return_field_from_args` that
has nullable set to `true`. How would nullability on the return field affect
behavior of sql queries? Thanks.
--
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]