Hyukjin Kwon created SPARK-62235:
------------------------------------
Summary: Collect reference cycles through the plans and
expressions that several objects share, as PySpark collects them, in the Python
client
Key: SPARK-62235
URL: https://issues.apache.org/jira/browse/SPARK-62235
Project: Spark
Issue Type: Improvement
Components: Connect
Affects Versions: 5.0.0
Reporter: Hyukjin Kwon
A DataFrame, a Column or another object of the Python client reports the
functions of UDFs, the plans of the Python client and the Observations of its
plan to Python's garbage collector only when it alone holds them. When two
objects share a plan or an expression, such as a Column and its DataFrame, a
DataFrame and one derived from it, or a DataFrame and a Column of its subquery,
neither reports them. So a reference cycle that keeps two of the holders, such
as through a bound method of an object that keeps both, is not collected, where
PySpark collects it, as each of its holders is a Python object with a reference
of its own. A stream writer also holds its DataFrame, where PySpark's holds the
plan. Report each shared part through one Python object that each of its
holders references, so that the collector frees such cycles as PySpark's does.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]