-
Notifications
You must be signed in to change notification settings - Fork 70
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
refactor!: update ScanData
to struct with new FilteredEngineData
type
#768
base: main
Are you sure you want to change the base?
refactor!: update ScanData
to struct with new FilteredEngineData
type
#768
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #768 +/- ##
==========================================
+ Coverage 84.35% 84.38% +0.03%
==========================================
Files 81 81
Lines 19233 19249 +16
Branches 19233 19249 +16
==========================================
+ Hits 16224 16244 +20
+ Misses 2205 2201 -4
Partials 804 804 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ScanData
struct with new FilteredEngineData
typeScanData
to struct with new FilteredEngineData
type
kernel/src/scan/mod.rs
Outdated
.map(|res| { | ||
let (data, vec, transforms) = res?; | ||
let scan_data = res?; | ||
let (data, sel_vec) = scan_data.filtered_data; | ||
let scan_files = vec![]; | ||
state::visit_scan_files( |
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.
Should we have a visit_scan_data_files
or similar that just takes the ScanData
? Then we don't have to do this decomposition all over the place
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.
How about updating visit_scan_files
to just take ScanData
?
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.
discussed a little offline: i'm kinda partial to a ScanData.visit(callback, context)
?
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.
Implemented @zachschuermann 's approach
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.
few comments. and we need to ensure all the breaking changes are clearly spelled out in PR description
kernel/src/engine_data.rs
Outdated
/// | ||
/// `Box<dyn EngineData>` - The underlying data | ||
/// `Vec<bool>` - Selection vector where `true` marks rows to include in results | ||
pub type FilteredEngineData = (Box<dyn EngineData>, Vec<bool>); |
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.
what about just making this a struct?
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.
👍
kernel/src/scan/mod.rs
Outdated
.map(|res| { | ||
let (data, vec, transforms) = res?; | ||
let scan_data = res?; | ||
let (data, sel_vec) = scan_data.filtered_data; | ||
let scan_files = vec![]; | ||
state::visit_scan_files( |
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.
discussed a little offline: i'm kinda partial to a ScanData.visit(callback, context)
?
What changes are proposed in this pull request?
ScanData
from typed tuple to struct. ScanData is now a struct with fields:FilteredEngineData
instance.Introduction of
FilteredEngineData
type:Couples
EngineData
with a selection vector indicating which rows to process.This type is returned from the
scan_data
API and the incomingcheckpoint
APIUpdates
visit_scan_files
parameters to acceptScanData
to avoid de-structuring.Corresponding FFI changes for
visit_scan_files
to acceptScanData
paramHow was this change tested?
All current tests pass.