Skip to content

[VL][TEST] Repro for Delta stats ClassCastException (DO NOT MERGE)#12293

Closed
felipepessoto wants to merge 1 commit into
apache:mainfrom
felipepessoto:test-only-delta-stats-classcast
Closed

[VL][TEST] Repro for Delta stats ClassCastException (DO NOT MERGE)#12293
felipepessoto wants to merge 1 commit into
apache:mainfrom
felipepessoto:test-only-delta-stats-classcast

Conversation

@felipepessoto

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

This PR is for demonstration only and must not be merged. The fix lives in #12292.

It contains only the regression test from #12292, without the fix, to prove the test is a valid reproduction: it fails on current main and passes once the fix is applied.

GlutenDeltaStatsSuite writes a Delta table whose per-file min/max statistics over a TIMESTAMP_NTZ column cannot be offloaded to Velox. Without the fix, GlutenDeltaJobStatsTracker unconditionally casts the statistics projection to a WholeStageTransformer, so the write task crashes with:

java.lang.ClassCastException: org.apache.spark.sql.execution.ProjectExec cannot be cast to org.apache.gluten.execution.WholeStageTransformer

How was this patch tested?

This is the test. CI on this PR is expected to FAIL (red) at GlutenDeltaStatsSuite, demonstrating the bug on current main. The companion fix PR #12292 runs the same test green.

Locally verified (Spark 3.5, Scala 2.12): without the fix the suite fails with the ClassCastException above (Tests: succeeded 0, failed 1); with the fix it passes (succeeded 1, failed 0).

Was this patch authored or co-authored using generative AI tooling?

Generated-by: GitHub Copilot CLI (claude-opus-4.8)

This branch contains only the regression test from the companion fix PR, without
the fix, to demonstrate that the test fails on current main and is therefore a
valid reproduction.

The test writes a Delta table whose per-file min/max statistics over a
TIMESTAMP_NTZ column cannot be offloaded to Velox. Without the fix the write
task crashes while collecting statistics with:

  java.lang.ClassCastException: org.apache.spark.sql.execution.ProjectExec
  cannot be cast to org.apache.gluten.execution.WholeStageTransformer

The actual fix lives in the companion PR; this PR is for demonstration only and
must not be merged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@felipepessoto felipepessoto force-pushed the test-only-delta-stats-classcast branch from 42348bb to db89d71 Compare June 14, 2026 19:26
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.

1 participant