rymurr commented on a change in pull request #7275: URL: https://github.com/apache/arrow/pull/7275#discussion_r448223616
########## File path: java/vector/src/main/java/org/apache/arrow/vector/BitVectorHelper.java ########## @@ -37,6 +37,20 @@ private BitVectorHelper() {} + /** + * Get the index of byte corresponding to bit index in validity buffer. + */ + public static long byteIndex(long absoluteBitIndex) { + return absoluteBitIndex >> 3; + } + + /** + * Get the relative index of bit within the byte in validity buffer. + */ + public static long bitIndex(long absoluteBitIndex) { Review comment: done ########## File path: java/vector/src/main/java/org/apache/arrow/vector/BitVectorHelper.java ########## @@ -57,12 +71,12 @@ public static int bitIndex(int absoluteBitIndex) { * @param validityBuffer validity buffer of the vector * @param index index to be set */ - public static void setBit(ArrowBuf validityBuffer, int index) { + public static void setBit(ArrowBuf validityBuffer, long index) { // it can be observed that some logic is duplicate of the logic in setValidityBit. // this is because JIT cannot always remove the if branch in setValidityBit, // so we give a dedicated implementation for setting bits. - final int byteIndex = byteIndex(index); - final int bitIndex = bitIndex(index); + final long byteIndex = byteIndex(index); + final long bitIndex = bitIndex(index); Review comment: done ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org