Skip to content

[CELEBORN-2573] Fix mixed-record Spark shuffle writer tests - #3988

Open
huangxiaopingRD wants to merge 2 commits into
apache:mainfrom
huangxiaopingRD:codex/fix-spark-mixed-record-tests
Open

huangxiaopingRD wants to merge 2 commits into
apache:mainfrom
huangxiaopingRD:codex/fix-spark-mixed-record-tests

Conversation

@huangxiaopingRD

@huangxiaopingRD huangxiaopingRD commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Fix the mixed giant/small record tests for the Spark shuffle writers. Use four deterministic records in the same partition, including a giant record, and verify the records read back for the regular and UnsafeRow serializers. Check the batch sizes for row-based writers; columnar writers combine the rows into columnar batches and are verified by their round-trip results.

Why are the changes needed?

2 << 30 overflows to a negative int, so both tests currently write no records. The shared test helper also sets mix to false, so fixing the size alone would not exercise a mixture of giant and small records. Both the hash and sort writer suites inherit these tests.

Jira: https://issues.apache.org/jira/browse/CELEBORN-2573

Does this PR resolve a correctness bug?

  • Yes

Does this PR introduce any user-facing change?

  • Yes

How was this patch tested?

  • Spark 3.5: HashBasedShuffleWriterSuiteJ, SortBasedShuffleWriterSuiteJ, and ColumnarHashBasedShuffleWriterSuiteJ (40 tests passed).
  • Verified that replacing the giant record with a normal record makes the mixed-record test fail.
  • Spotless checks for the modified Java files.

@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.92%. Comparing base (dfdada3) to head (9a3c239).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3988      +/-   ##
============================================
+ Coverage     62.64%   62.92%   +0.28%     
  Complexity      451      451              
============================================
  Files           407      407              
  Lines         29032    29037       +5     
  Branches       2858     2861       +3     
============================================
+ Hits          18185    18268      +83     
+ Misses         9467     9385      -82     
- Partials       1380     1384       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant