alamb commented on code in PR #22663:
URL: https://github.com/apache/datafusion/pull/22663#discussion_r3389992527
##########
datafusion/physical-expr/src/async_scalar_function.rs:
##########
@@ -211,6 +208,12 @@ impl PhysicalExpr for AsyncFuncExpr {
self.func.data_type(input_schema)
}
+ fn return_field(&self, _input_schema: &Schema) -> Result<FieldRef> {
+ Ok(Arc::new(
+ self.return_field.as_ref().clone().with_name(&self.name),
Review Comment:
nothing that this PR did -- but why doesn't this code set the field name on
the return_field that is saved in the struct, and return a clone (Arc::clone)
of that, rather than deep cloning the field (as this does)?
--
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]