-
Notifications
You must be signed in to change notification settings - Fork 876
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
Implement compare operations for view types #5900
Conversation
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.
Unfortunately, this PR becomes larger than I thought, partly because the test cases are rather comprehensive and the comparison is non-trivial.
👍
This PR is really nicely done in my opinion @XiangpengHao 🏆
The only things I think are required prior to merging is some additional test coverage (I left a note about what I think i smissing)
I also left some suggestions that might make the code easier to read, but I don't think they are necessary
Thanks again
cc @ariesdevil and @Weijun-H
@@ -538,6 +540,135 @@ impl<'a, T: ByteArrayType> ArrayOrd for &'a GenericByteArray<T> { | |||
} | |||
} | |||
|
|||
/// Comparing two ByteView types are non-trivial. | |||
/// It takes a bit of patience to understand why we don't just compare two &[u8] directly. |
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.
😮 🏆 🥇 for the comments
Need some additional test coverage prior to merging
I also filed #5903 to track adding benchmarks for these kernels |
Added more tests and refactored a bit to make it more clear! can you take a look again? @alamb |
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.
Great work @XiangpengHao
Which issue does this PR close?
Closes #5897 .
Rationale for this change
Now we can compare two view type arrays.
Unfortunately, this PR becomes larger than I thought, partly because the test cases are rather comprehensive and the comparison is non-trivial.
The view type comparison code might be slightly more esoteric than one might expected, I hope the comments could help understanding/justify the complexity.
What changes are included in this PR?
Are there any user-facing changes?