Skip to content

Conversation

@mbutrovich
Copy link
Contributor

@mbutrovich mbutrovich commented Nov 1, 2025

Which issue does this PR close?

Closes #2660.

Rationale for this change

DataSourceExec bases its number of target_partitions on the size of the Vec<Vec<PartitionedFiles> passed into it, where the outer Vec size is the number of partitions and parallelism in the scan. We currently only execute the target partition so we get correct data results, but the operator still thinks its outputting target_partitions partitions, so we get a mismatch in downstream operators.

What changes are included in this PR?

  • Only extract PartitionedFiles for the target Spark partition and pass that into DataSourceExec
  • Always execute partition 0 in DataFusion context (unsure about blast radius on this one, watching CI)

How are these changes tested?

Existing tests, removed fallbacks referring to #2660.

@codecov-commenter
Copy link

codecov-commenter commented Nov 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.30%. Comparing base (f09f8af) to head (ab3a1c9).
⚠️ Report is 653 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2675      +/-   ##
============================================
+ Coverage     56.12%   59.30%   +3.17%     
- Complexity      976     1448     +472     
============================================
  Files           119      147      +28     
  Lines         11743    13796    +2053     
  Branches       2251     2369     +118     
============================================
+ Hits           6591     8182    +1591     
- Misses         4012     4388     +376     
- Partials       1140     1226      +86     

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix @mbutrovich!

@andygrove andygrove merged commit 8bda6d9 into apache:main Nov 1, 2025
112 checks passed
@mbutrovich mbutrovich deleted the fix_2660 branch November 1, 2025 14:21
mbutrovich added a commit to mbutrovich/datafusion-comet that referenced this pull request Nov 3, 2025
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.

[native_datafusion] Partition count mismatch when creating HashJoinExec

3 participants