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

Avoid double counting closestFixedBits in percentileBits method

    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

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: