Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Tab to spaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
GPSnoopy committed May 20, 2022
1 parent 53d06c4 commit 7e68dbc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/array/ord.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ pub fn build_compare(left: &dyn Array, right: &dyn Array) -> Result<DynComparato
| (Duration(Nanosecond), Duration(Nanosecond)) => compare_primitives::<i64>(left, right),
(Float32, Float32) => compare_f32(left, right),
(Float64, Float64) => compare_f64(left, right),
(Decimal(_,_), Decimal(_,_)) => compare_primitives::<i128>(left, right),
(Decimal(_,_), Decimal(_,_)) => compare_primitives::<i128>(left, right),
(Utf8, Utf8) => compare_string::<i32>(left, right),
(LargeUtf8, LargeUtf8) => compare_string::<i64>(left, right),
(Binary, Binary) => compare_binary::<i32>(left, right),
Expand Down
12 changes: 6 additions & 6 deletions tests/it/array/ord.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ fn f64_zeros() -> Result<()> {

#[test]
fn decimal() -> Result<()> {
let array = Int128Array::from_slice(&[1, 2]).to(DataType::Decimal(38, 0));
let cmp = build_compare(&array, &array)?;
let array = Int128Array::from_slice(&[1, 2]).to(DataType::Decimal(38, 0));
let cmp = build_compare(&array, &array)?;

assert_eq!(Ordering::Less, (cmp)(0, 1));
assert_eq!(Ordering::Equal, (cmp)(1, 1));
assert_eq!(Ordering::Greater, (cmp)(1, 2));
assert_eq!(Ordering::Equal, (cmp)(1, 1));
assert_eq!(Ordering::Greater, (cmp)(1, 2));
Ok(())
}

Expand Down

0 comments on commit 7e68dbc

Please sign in to comment.