Uploaded image for project: 'ORC'
  1. ORC
  2. ORC-975

Avoid double counting closestFixedBits in percentileBits method

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.8.0
    • 1.8.0
    • Java
    • None

    Description

      SerializationUtils

      310  int idx = encodeBitWidth(findClosestNumBits(data[i]));
      
      public int encodeBitWidth(int n) {
          n = getClosestFixedBits(n);
          .....
      }
      
      public int findClosestNumBits(long value) {
        final int numBits = 64 - Long.numberOfLeadingZeros(value);
        return getClosestFixedBits(numBits);
      }
      

      getClosestFixedBits is called twice.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Guiyankuang Yiqun Zhang
            Guiyankuang Yiqun Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment