Apache Iceberg version
None
Query engine
None
Please describe the bug 🐞
|
public static ByteBuffer floatingPointOrderedBytes(double val, ByteBuffer reuse) { |
|
ByteBuffer bytes = ByteBuffers.reuse(reuse, PRIMITIVE_BUFFER_SIZE); |
|
long lval = Double.doubleToLongBits(val); |
|
lval ^= ((lval >> (Integer.SIZE - 1)) | Long.MIN_VALUE); |
|
bytes.putLong(lval); |
|
return bytes; |
|
} |
Here the shift is >> (Integer.SIZE - 1) = >> 31.The fix is a one-character change: >> (Integer.SIZE - 1) → >> (Long.SIZE - 1).
Willingness to contribute
Apache Iceberg version
None
Query engine
None
Please describe the bug 🐞
iceberg/core/src/main/java/org/apache/iceberg/util/ZOrderByteUtils.java
Lines 102 to 108 in 49b89a8
Here the shift is >> (Integer.SIZE - 1) = >> 31.The fix is a one-character change: >> (Integer.SIZE - 1) → >> (Long.SIZE - 1).
Willingness to contribute