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

Commit

Permalink
fix review conversation
Browse files Browse the repository at this point in the history
  • Loading branch information
TCeason committed Mar 2, 2023
1 parent a77621d commit bf5c86b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/io/parquet/read/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ fn convert_i128(value: &[u8], n: usize) -> i128 {
}

fn convert_i256(value: &[u8]) -> i256 {
let mut bytes = [0u8; 32];
let mut neg_bytes = [255u8; 32];
if value[0] >= 128 {
let mut neg_bytes = [255u8; 32];
neg_bytes[32 - value.len()..].copy_from_slice(value);
i256::from_be_bytes(neg_bytes)
} else {
let mut bytes = [0u8; 32];
bytes[32 - value.len()..].copy_from_slice(value);
i256::from_be_bytes(bytes)
}
Expand Down

0 comments on commit bf5c86b

Please sign in to comment.