You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by "Dongjoon Hyun (Jira)" <ji...@apache.org> on 2021/08/30 04:04:00 UTC
[jira] [Resolved] (ORC-975) Avoid double counting closestFixedBits
in percentileBits method
[ https://issues.apache.org/jira/browse/ORC-975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dongjoon Hyun resolved ORC-975.
-------------------------------
Fix Version/s: (was: 1.7.0)
1.8.0
Assignee: Yiqun Zhang
Resolution: Fixed
This is resolved via https://github.com/apache/orc/pull/886
> 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
> 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.3.4#803005)