You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@orc.apache.org by "Yiqun Zhang (Jira)" <ji...@apache.org> on 2021/08/28 09:07:00 UTC
[jira] [Created] (ORC-975) Avoid double counting closestFixedBits
in percentileBits method
Yiqun Zhang created ORC-975:
-------------------------------
Summary: Avoid double counting closestFixedBits in percentileBits method
Key: ORC-975
URL: https://issues.apache.org/jira/browse/ORC-975
Project: ORC
Issue Type: Improvement
Components: Java
Affects Versions: 1.7.0
Reporter: Yiqun Zhang
Fix For: 1.7.0
SerializationUtils
{code:java}
310 int idx = encodeBitWidth(findClosestNumBits(data[i]));
{code}
{code:java}
public int encodeBitWidth(int n) {
n = getClosestFixedBits(n);
.....
}
{code}
{code:java}
public int findClosestNumBits(long value) {
final int numBits = 64 - Long.numberOfLeadingZeros(value);
return getClosestFixedBits(numBits);
}
{code}
getClosestFixedBits is called twice.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)