-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Fix bug with merge tasks that allows for tasks larger than max size allowed #1882
Conversation
samster25
commented
Feb 14, 2024
•
edited
Loading
edited
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1882 +/- ##
==========================================
- Coverage 85.55% 85.50% -0.05%
==========================================
Files 55 55
Lines 6194 6194
==========================================
- Hits 5299 5296 -3
- Misses 895 898 +3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM, had some questions about the logic of self.accumulator_ready()
src/daft-scan/src/scan_task_iters.rs
Outdated
@@ -45,74 +45,71 @@ struct MergeByFileSize { | |||
accumulator: Option<ScanTaskRef>, | |||
} | |||
|
|||
impl MergeByFileSize { | |||
fn accumulator_ready(&self) -> bool { | |||
if self.accumulator.is_none() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is a None
accumulator considered ready?
In the main loop logic, ready accumulators are naively yielded. Should the accumulator_ready
function instead yield true only for these:
- It is Some, and has no size (we won't be merging this anyways, might as well say its ready to yield)
- It is Some, has a size, and the size is smaller than min
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done