rich7420 commented on code in PR #7181:
URL: https://github.com/apache/datafusion-comet/pull/7181#discussion_r4391238881


##########
native/core/src/execution/python_udf.rs:
##########
@@ -297,14 +468,18 @@ impl ArrowPythonUdf {
                     kwargs.set_item(name, arg).map_err(python_error)?;
                 }
             }
-            let result = self
-                .callable
-                .bind(py)
-                .call(
-                    PyTuple::new(py, positional).map_err(python_error)?,
-                    Some(&kwargs),
-                )
-                .map_err(|error| python_traceback_error(py, error))?;
+            let positional = PyTuple::new(py, 
positional).map_err(python_error)?;
+            let call = self
+                .task
+                .as_deref()
+                .map(|task| RunningCall::enter(py, task))
+                .transpose()?;
+            let result = self.callable.bind(py).call(positional, 
Some(&kwargs));
+            drop(call);

Review Comment:
   Keep registration through cast; ExtensionArray.cast still escapes 
cancellation and returns a successful batch after kill_task.



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