Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses a bbox predicate bug that was failing for non-POINT geometry types and refactors the record deserialization code to eliminate duplication and improve maintainability.
- Fixed bbox predicate to handle all geometry types by using xmin/xmax/ymin/ymax instead of assuming POINT types
- Consolidated duplicate deserialization logic by introducing a generic
process_batchmethod andFromtrait implementations - Enhanced logging to include record type in collection messages
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
rust/bambam-omf/src/collection/record/record_type.rs |
Added generic process_batch method and Display trait implementation to reduce code duplication |
rust/bambam-omf/src/collection/record/overture_record.rs |
Implemented From traits for all record types to enable automatic conversion |
rust/bambam-omf/src/collection/filter/bbox_row_predicate.rs |
Fixed bbox predicate logic to check xmin/xmax/ymin/ymax for all geometry types, extracted helper functions |
rust/bambam-omf/src/collection/collector.rs |
Refactored to use new process_batch method, eliminated duplicate deserialization code, improved logging |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /// tests the bounding box of each row in the record batch, filtering entries | ||
| /// that are not fully-contained. |
There was a problem hiding this comment.
The comment says the filter checks for entries that are "fully-contained", but this should be clarified. The actual behavior depends on the implementation of the within_box function. If the intent is to check full containment of the row's bbox within the predicate's bbox, this should be stated more explicitly in the comment.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
revisions to the OMF collection code: