[ 
https://issues.apache.org/jira/browse/ORC-975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dongjoon Hyun updated ORC-975:
------------------------------
    Affects Version/s: 1.8.0
                           (was: 1.7.0)

> 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.8.0
>            Reporter: Yiqun Zhang
>            Assignee: Yiqun Zhang
>            Priority: Minor
>             Fix For: 1.8.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.20.7#820007)

Reply via email to