zhengruifeng opened a new pull request, #37995:
URL: https://github.com/apache/spark/pull/37995
### What changes were proposed in this pull request?
to clean the intermediate cached datasets created in
`AttachDistributedSequenceExec`
1, persist the input dataset on the python side;
2, unpsersit it if the job completed;
### Why are the changes needed?
in `argmax`, `argmin`, `searchsorted`, the intermediate cached RDDs are
still cached after the job completed.
before:
```
In [1]: import pyspark.pandas as ps
...: s = ps.Series({'Corn Flakes': 100.0, 'Almond Delight': 110.0,
'Cinnamon Toast Crunch': 120.0, 'Cocoa Puff': 110.0})
...: s.argmin()
...:
...: sc._jsc.getPersistentRDDs()
Out[1]: {6: JavaObject id=o87}
In [2]: s.argmin()
Out[2]: 0
Out[3]: sc._jsc.getPersistentRDDs()
Out[3]: {6: JavaObject id=o160, 25: JavaObject id=o161}
```
after:
```
In [1]: import pyspark.pandas as ps
...: s = ps.Series({'Corn Flakes': 100.0, 'Almond Delight': 110.0,
'Cinnamon Toast Crunch': 120.0, 'Cocoa Puff': 110.0})
...: s.argmin()
...:
...: sc._jsc.getPersistentRDDs()
Out[1]: {}
In [2]: s.argmin()
Out[2]: 0
Out[3]: sc._jsc.getPersistentRDDs()
Out[3]: {}
```
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
existing suites
--
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]