lidavidm commented on a change in pull request #29818:
URL: https://github.com/apache/spark/pull/29818#discussion_r518959078
##########
File path: python/pyspark/sql/tests/test_arrow.py
##########
@@ -190,6 +190,13 @@ def test_pandas_round_trip(self):
pdf_arrow = df.toPandas()
assert_frame_equal(pdf_arrow, pdf)
+ def test_pandas_self_destruct(self):
+ with
self.sql_conf({"spark.sql.execution.arrow.pyspark.selfDestruct.enabled": True}):
+ pdf = self.create_pandas_data_frame()
Review comment:
It's really hard to verify this in an automated way due to how jemalloc
works (except possibly by reconfiguring jemalloc) - at the very least it'd be
iffy to do in a unit test like this without some setup.
(The brief explanation is that with how Arrow configures jemalloc, memory is
only slowly reclaimed by the OS, so in naive measurements, you'll still see a
memory usage spike - albeit slightly less of one. In C++, you can force
jemalloc to purge everything right away, but even via ctypes I couldn't access
the right functions from Python.)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]