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


##########
datafusion/physical-expr/src/async_scalar_function.rs:
##########
@@ -88,12 +88,8 @@ impl AsyncFuncExpr {
     }
 
     /// Return the output field generated by evaluating this function
-    pub fn field(&self, input_schema: &Schema) -> Result<Field> {
-        Ok(Field::new(
-            &self.name,
-            self.func.data_type(input_schema)?,
-            self.func.nullable(input_schema)?,
-        ))
+    pub fn field(&self, _input_schema: &Schema) -> Result<Field> {
+        Ok(self.return_field.as_ref().clone().with_name(&self.name))

Review Comment:
   i wonder if we're better off deprecating this function and do something 
similar to `ScalarFunctionExpr` and implement `PhysicalExpr::return_field` 🤔 
   
   
https://github.com/apache/datafusion/blob/e2db7668f621aafb1a09aacdbdb8b0bd37b0caa3/datafusion/physical-expr/src/scalar_function.rs#L283-L285



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