Skip to content

Commit ec42662

Browse files
committed
optimize hex_int64
1 parent c459982 commit ec42662

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • datafusion/spark/src/function/math

datafusion/spark/src/function/math/hex.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@ fn hex_int64(num: i64, buffer: &mut Vec<u8>) {
122122
return;
123123
}
124124

125-
let mut n = num;
125+
let mut n = num as u64;
126126
let mut temp = [0u8; 16];
127127
let mut i = 16;
128-
while n != 0 && i > 0 {
128+
while n != 0 {
129129
i -= 1;
130130
let digest = (n & 0xF) as u8;
131131
temp[i] = HEX_CHARS_UPPER[digest as usize];

0 commit comments

Comments
 (0)