[AURON #1961] Fix Spark 4.0+: unit test catalyst codegen failure due to session artifact isolation #1971
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #1961
Rationale for this change
Spark 4.0+ enables session artifact isolation by default(Related to apache/spark#48120), a feature entirely absent in Spark 3.x. This mechanism stores Catalyst dynamically generated inline classes (e.g.,
org.apache.spark.sql.catalyst.expressions.Object) in session-specific isolated directories. TheREPL class servercannot scan these directories, causing class lookup failures and breaking Catalyst codegen in unit tests. Isolation is unnecessary for unit tests (single-session execution, no class conflict risk), so disabling it is a minimal, safe fix.What changes are included in this PR?
For Spark 4.0+ only, conditionally set
spark.sql.artifact.isolation.enabled=falsein unit test configurations. This binds Catalyst dynamic codegen classes to the default "default" isolation group, aligning behavior with Spark 3.x.Are there any user-facing changes?
No.
How was this patch tested?