guiyanakuang commented on a change in pull request #886:
URL: https://github.com/apache/orc/pull/886#discussion_r698139519



##########
File path: java/core/src/java/org/apache/orc/impl/SerializationUtils.java
##########
@@ -270,8 +270,16 @@ public static BigInteger readBigInteger(InputStream input) 
throws IOException {
    * @return bits required to store value
    */
   public int findClosestNumBits(long value) {
-    final int numBits = 64 - Long.numberOfLeadingZeros(value);
-    return getClosestFixedBits(numBits);
+    return getClosestFixedBits(findNumBits(value));
+  }
+
+  /**
+   * Count the number of bits left after subtracting leading zeros
+   * @param value
+   * @return bits left after subtracting leading zeros
+   */
+  public int findNumBits(long value) {

Review comment:
       Yes, I should not expose this internal method.  Fix in 6fa50b2




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to