Binary search optimization for Parquet Variant's object field ID lookup - #23638
Binary search optimization for Parquet Variant's object field ID lookup#23638abigalekim wants to merge 4 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe change adds sortedness-aware object field lookup for Parquet variant extraction. Sorted field IDs use binary search. Unsorted field IDs use linear scanning. Path resolution reads sortedness metadata and passes it to the lookup. ChangesVariant object path resolution
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/ok to test 3d840b7 |
vyasr
left a comment
There was a problem hiding this comment.
Can you post any benchmarks for this change? We should verify that the more efficient algorithm is actually resulting in performance gains, especially since without making is_sorted a compile-time parameter you may wind up with a less efficient kernel due to how the compiler optimizes the larger code footprint.
The implementation looks good though so I'm approving assuming you show the benchmarks. Thank you!
| break; | ||
| if (is_sorted) { | ||
| size_type lo = 0; | ||
| size_type hi = num_fields.value(); |
There was a problem hiding this comment.
Are we guaranteed that num_fields.value() is not zero?
Description
locate_object_fieldmaps an integer dictionary ID to the encoded bytes of a field value within a Parquet Variant object blob. This function previously did a linear scan over all field IDs to find the matching entry. This PR implements binary search forlocate_object_fieldwhen the Variant metadata's sorted_strings bit is set, which guarantees that field IDs within an object are sorted.Checklist