Skip to content

test: enable SparkSessionExtensionSuite with Comet#4772

Merged
andygrove merged 1 commit into
apache:mainfrom
andygrove:fix-1197-remove-stale-workaround
Jul 1, 2026
Merged

test: enable SparkSessionExtensionSuite with Comet#4772
andygrove merged 1 commit into
apache:mainfrom
andygrove:fix-1197-remove-stale-workaround

Conversation

@andygrove

Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #1197.

Rationale for this change

SparkSessionExtensionSuite exercises Spark's injectColumnar extension point with a user-supplied MyColumnarRule / 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, and reset column vectors) failed with BoundReference cannot be cast to ColumnarExpression when 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=false for 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=false overrides (and their // https://github.com/apache/datafusion-comet/issues/1197 comments) from SparkSessionExtensionSuite in 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 SparkSessionExtensionSuite now 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.

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.

@kazuyukitanimura kazuyukitanimura left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@andygrove andygrove merged commit ca95f9a into apache:main Jul 1, 2026
32 checks passed
@andygrove andygrove deleted the fix-1197-remove-stale-workaround branch July 1, 2026 20:35
marvelshan pushed a commit to marvelshan/datafusion-comet that referenced this pull request Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

org.apache.spark.sql.catalyst.expressions.BoundReference cannot be cast to class org.apache.spark.sql.ColumnarExpression

2 participants