feat: Reuse existing file instead of reopening during shuffle write#2577
feat: Reuse existing file instead of reopening during shuffle write#2577zuston wants to merge 3 commits intoapache:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2577 +/- ##
=============================================
- Coverage 56.12% 42.19% -13.94%
- Complexity 976 1093 +117
=============================================
Files 119 146 +27
Lines 11743 13747 +2004
Branches 2251 2353 +102
=============================================
- Hits 6591 5800 -791
- Misses 4012 6978 +2966
+ Partials 1140 969 -171 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| if let Some(spill_data) = self.partition_writers[i].spill_file.as_ref() { | ||
| let mut spill_file = | ||
| BufReader::new(File::open(spill_data.temp_file.path()).map_err(to_df_err)?); | ||
| let mut spill_file = BufReader::new(&spill_data.file); |
There was a problem hiding this comment.
spill_data.file is opened in write-only mode.
datafusion-comet/native/core/src/execution/shuffle/shuffle_writer.rs
Lines 1169 to 1180 in 8f89c1c
|
Also, could you provide more information about the |
updated. |
|
Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days. |
Which issue does this PR close?
Closes #.
Rationale for this change
Reduce the system call cost to reuse the existing file
What changes are included in this PR?
How are these changes tested?