BryanCutler commented on a change in pull request #29818:
URL: https://github.com/apache/spark/pull/29818#discussion_r519049299
##########
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:
Well, I was thinking you might be able to use
`pyarrow.total_allocated_bytes()` - this is how it's tested in pyarrow
https://github.com/apache/arrow/blob/e6eb61f58ef382003c9462924563f575d9a59c13/python/pyarrow/tests/test_pandas.py#L3340.
But the table is deallocated after `toPandas()` returns anyway, so you would
have to sample before and after `pdf = table.to_pandas(**pandas_options)`..
----------------------------------------------------------------
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]