Skip to content

Commit 616db28

Browse files
committed
Check split errors without requiring Debug on DecimalParts
Signed-off-by: Connor Tsui <[email protected]>
1 parent 6c94ee4 commit 616db28

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

  • encodings/decimal-byte-parts/src/decimal_byte_parts/split

‎encodings/decimal-byte-parts/src/decimal_byte_parts/split/tests.rs‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ fn decimal<T: NativeDecimalType>(values: Buffer<T>, validity: Validity) -> Decim
3939
/// Runs splitting through validation and checks the reported requirement.
4040
#[track_caller]
4141
fn assert_split_error(decimal: &DecimalArray, lower_part_count: usize, expected: &str) {
42-
let error = split_decimal(
42+
let error = match split_decimal(
4343
decimal,
4444
lower_part_count,
4545
&mut SESSION.create_execution_ctx(),
46-
)
47-
.expect_err("the fixture violates a split requirement");
46+
) {
47+
Ok(_) => panic!("the fixture must violate a split requirement"),
48+
Err(error) => error,
49+
};
4850
assert!(error.to_string().contains(expected), "{error}");
4951
}
5052

0 commit comments

Comments
 (0)