test: enable SparkSessionExtensionSuite with Comet#4772
Merged
Conversation
The columnar-rule injection conflict tracked in apache#1197 no longer reproduces. SparkSessionExtensionSuite passes with Comet enabled in the patched Spark test suite, so remove the spark.comet.enabled=false workarounds from the Spark 3.4.3, 3.5.8, 4.0.2, and 4.1.2 diffs.
marvelshan
pushed a commit
to marvelshan/datafusion-comet
that referenced
this pull request
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 #1197.
Rationale for this change
SparkSessionExtensionSuiteexercises Spark'sinjectColumnarextension point with a user-suppliedMyColumnarRule/PreRuleReplaceAddWithBrokenVersion. Issue #1197 reported that four of its tests (inject columnar AQE on,inject columnar AQE off,SPARK-39991: AQE should retain column statistics from completed query stages, andreset column vectors) failed withBoundReference cannot be cast to ColumnarExpressionwhen Comet was enabled, because Comet's own injected columnar rules collided with the test's rule.The diffs worked around this by forcing
spark.comet.enabled=falsefor those tests. That conflict no longer reproduces: the suite passes with Comet genuinely injected, so the workaround is now stale and hides real coverage of Comet coexisting with a user-injected columnar rule.What changes are included in this PR?
Remove the three
spark.comet.enabled=falseoverrides (and their// https://github.com/apache/datafusion-comet/issues/1197comments) fromSparkSessionExtensionSuitein the Spark 3.4.3, 3.5.8, 4.0.2, and 4.1.2 diffs. Each diff was regenerated from a clean checkout of the corresponding Spark tag, so the only change is the removal of that one file hunk.How are these changes tested?
The existing
SparkSessionExtensionSuitenow runs with Comet enabled (ENABLE_COMET=true) across all four Spark versions in CI. Locally, the full suite (27 tests, including the four previously worked around) passed on Spark 3.5.8 with a control assertion confirming Comet's columnar rule was actually injected into the test session, ruling out a vacuous pass. CI exercises the remaining versions.