Dandandan commented on code in PR #7731:
URL: https://github.com/apache/arrow-rs/pull/7731#discussion_r2160334767
##########
arrow-ord/src/cmp.rs:
##########
@@ -626,6 +645,16 @@ pub fn compare_byte_view<T: ByteViewType>(
) -> std::cmp::Ordering {
assert!(left_idx < left.len());
assert!(right_idx < right.len());
+ if left.data_buffers().is_empty() && right.data_buffers().is_empty() {
+ // Only need to compare the inlined bytes
+ let l_bytes = unsafe {
+
GenericByteViewArray::<T>::inline_value(left.views().get_unchecked(left_idx),
12)
Review Comment:
This returns greater (instead of Equal):
```
> println!("{:?}", "\0".cmp(""))
> Greater
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]