LuciferYang opened a new issue, #12858: URL: https://github.com/apache/gluten/issues/12858
### What happens The Gluten-authored `flatten function` case caches three DataFrames and never releases them. In `gluten-ut/spark35/src/test/scala/org/apache/spark/sql/GlutenDataFrameFunctionsSuite.scala` the calls are at `:72`, `:99` and `:116`: ```scala // Test with cached relation, the Project will be evaluated with codegen intDF.cache() ``` There is no matching `unpersist()`, and no `try`/`finally` around the cached branch. The same case exists in all five version modules. ### Why it matters The cached blocks stay in the block manager for the rest of the suite. That is memory pressure the suite does not need, and it makes later cases in the same suite sensitive to execution order: whether a relation is already cached changes the plan they get. Order-dependent test failures are the hard kind to reproduce. ### History Not new. The case came from `de26ed2da` in `gluten-ut/spark33` and was copied into 3.4/3.5/4.0/4.1 verbatim by #12840, where Copilot flagged it. Whitespace-stripped, the migrated copy is byte-identical to the 3.3 original. ### Suggested fix Call `unpersist()` after each cached branch's assertions, ideally in a `finally` so a failing assertion still releases the cache. Worth grepping the other `Gluten*Suite` files for the same shape while you are there. -- 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]
