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)