Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-49628][SQL] ConstantFolding should copy stateful expression be…
…fore evaluating ### What changes were proposed in this pull request? It's possible that a logical plan instance is being shared by multiple DFs and these DFs are executed in parallel. Spark always copy stateful expressions before evaluating them, but one place is missed: `ConstantFolding` can also execute expressions. This PR fixes it. ### Why are the changes needed? avoid concurrency issues. ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? Not able to write a test for it, but this concurrency issue is quite obvious ### Was this patch authored or co-authored using generative AI tooling? no Closes #48104 from cloud-fan/constant. Authored-by: Wenchen Fan <wenchen@databricks.com> Signed-off-by: Kent Yao <yao@apache.org> (cherry picked from commit 319e7cc) Signed-off-by: Kent Yao <yao@apache.org>
- Loading branch information