Skip to content

Conversation

@yew1eb
Copy link
Contributor

@yew1eb yew1eb commented Jan 29, 2026

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. The REPL class server cannot 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=false in 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?

@yew1eb yew1eb marked this pull request as draft January 29, 2026 15:14
@github-actions github-actions bot added the spark label Jan 29, 2026
@yew1eb yew1eb force-pushed the AURON_1961 branch 3 times, most recently from ff52054 to dcbddf9 Compare January 29, 2026 15:48
@yew1eb yew1eb changed the title Auron 1961 [AURON #1961] Fix Spark 4.1: Unit test Catalyst codegen failure from session artifacts isolation Jan 29, 2026
@yew1eb yew1eb changed the title [AURON #1961] Fix Spark 4.1: Unit test Catalyst codegen failure from session artifacts isolation [AURON #1961] Fix Spark 4.1: Unit test Catalyst codegen failure Jan 29, 2026
@yew1eb yew1eb changed the title [AURON #1961] Fix Spark 4.1: Unit test Catalyst codegen failure [AURON #1961] Fix Spark 4.0+: Unit test Catalyst codegen failure due to session artifact isolation Jan 29, 2026
@yew1eb yew1eb changed the title [AURON #1961] Fix Spark 4.0+: Unit test Catalyst codegen failure due to session artifact isolation [AURON #1961] Fix Spark 4.0+: unit test catalyst codegen failure due to session artifact isolation Jan 29, 2026
@yew1eb yew1eb marked this pull request as ready for review January 29, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix Spark 4.1: Catalyst codegen failure in unit tests due to session artifacts isolation

1 participant