JingsongLi commented on a change in pull request #8278: 
[FLINK-12335][Table-runtime]Remove useless code in class SegmentsUtil
URL: https://github.com/apache/flink/pull/8278#discussion_r286296038
 
 

 ##########
 File path: 
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java
 ##########
 @@ -417,7 +415,7 @@ private static boolean inFirstSegment(MemorySegment[] 
segments, int offset, int
         * @param index bit index from base offset.
         */
        public static void bitUnSet(MemorySegment segment, int baseOffset, int 
index) {
-               int offset = baseOffset + ((index & BIT_BYTE_POSITION_MASK) >>> 
3);
+               int offset = baseOffset + (index >>> 3);
                byte current = segment.get(offset);
                current &= ~(1 << (index & BIT_BYTE_INDEX_MASK));
 
 Review comment:
   We can't remove BIT_BYTE_INDEX_MASK, the `1 << ` is int operation, but 
`current &= ` should be byte operation.

----------------------------------------------------------------
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


With regards,
Apache Git Services

Reply via email to