You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "icexelloss (via GitHub)" <gi...@apache.org> on 2023/06/08 18:26:35 UTC

[GitHub] [arrow] icexelloss opened a new issue, #36000: [Python][C++] Simplify/Validate PyObject refcount in udf.cc

icexelloss opened a new issue, #36000:
URL: https://github.com/apache/arrow/issues/36000

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   In udf.cc, there is interaction between C++ and Python where the C++ code holds a user defined Python object inside a Kernel and invoke it over input data. 
   
   Due to this interaction, there are a number of `Py_INCREF` call as well as using `OwnRef` to manage the refcount for the PyObject (which represents the user defined function. The current code for managing it is either over complicated and/or bug where the C++ code might be over increasing the refcount. While this is not a huge issue (it probably cause the Python function to never be garbage collected), it could use some clean up / documentation as least to improve maintainability. 
   
   Appendix:
   * Related thread:  https://github.com/apache/arrow/pull/35514#discussion_r1205081272
   
   ### Component(s)
   
   C++


-- 
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: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org