-
Notifications
You must be signed in to change notification settings - Fork 108
Chore: vortex-array modules cleanup
#4818
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
Conversation
This comment was marked as spam.
This comment was marked as spam.
e3032fa to
4559b3f
Compare
|
@claude review |
|
Claude finished @connortsui20's task —— View job Code Review: vortex-array modules cleanup ✅Todo List:
Review SummaryThis is an excellent refactoring PR that significantly improves the organization and consistency of the 🎯 Positive AspectsConsistent Module StructureThe new standardized structure is well-designed and makes navigation much easier: Primitive Array Special TreatmentThe decision to make
Debug Validation EnhancementThe addition of debug validation in #[cfg(debug_assertions)]
Self::validate(&buffer, offset, len, &validity)
.vortex_expect("[Debug Assertion]: Invalid `BoolArray` parameters");This provides runtime validation in debug builds without affecting release performance. VTable OrganizationThe new
📋 Code Quality Assessment✅ Adheres to Repository Guidelines
✅ No Lint Issues
✅ Maintains API Compatibility
🔍 Technical Details ReviewedFile MovementsThe file reorganization is systematic and well-executed:
Test PreservationTests have been properly preserved and reorganized:
📊 Coverage ImpactThe codecov report shows 88.63% patch coverage with 260 lines missing coverage. This is expected for a refactoring PR where:
🎉 Recommendation✅ APPROVE - This is a high-quality refactoring that significantly improves code organization without introducing any functional changes or regressions. The standardized structure will make the codebase much more maintainable and navigable for both current and future contributors. The controversial |
f703d51 to
41b7f58
Compare
danking
left a comment
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.
This is great. My only difference of opinion is that I dislike "tests.rs" files. I prefer the tests at the bottom of the file with the relevant functions. I guess when I'm reading a function I'm both interested in what it does but also why I should believe it does that correctly. If the tests are not in-line, the file doesn't serve as a boundary within which I search for evidence. Instead, the whole module or the whole repo must be searched for the relevant tests.
|
Agree with @danking on the test part. Otherwise we can merge this |
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Also changes the export pattern for `BinaryView` and related types. Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
|
Discussed briefly offline, since the tests are not really specific to a single file (most tests will test several things that are split across the vtable trait, compute functions, and method implementations), for now we'll just keep it in I will mention that I feel the tests should be a bit more targeted to specific things (sort of how I structured the tests in |
41b7f58 to
952a813
Compare
Also renames `compress` to `bitpack_compress` since it gets exported out of `fastlanes` and you have no idea which method compress actually means. This is a purely cosmetic change that mimics the changes made in #4818 Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
The way in which the modules are structured under
vortex-array/src/arraysis quite inconsistent. This PR ensures that each kind of array consistently has the same structure, which is:array.rs: contains the array struct definition and implementationcompute: contains any compute function implementations that the encoding implements in separate filesvtable: contains the array vtable implementations, each in a separate file. The vtable itself is located invtable/mod.rsProbably the most controversial thing here is the addition of a
vtablemodule, where each helper trait implementation is in its own file. I agree that it isn't ideal as it means we have a lot of files named the same thing, but at the same time I feel it is far worse to have every single module place theirvtableimplementations in slightly different files (it becomes incredibly hard to find where things are, even with a language server).If we really care that the
ArrayVTableand theOperationsVTableshould be located in the same file, then I would argue that those traits should be combined.I also snuck in a change (first commit) where we validate in
new_uncheckedin debug mode only.Note: All modules have files moved around in the exact same way with the exception of
primitive, where I create anarraymodule instead of anarray.rsbecause there are so many extra things we implement specifically forPrimitiveArray.