JingsongLi commented on a change in pull request #8579: [FLINK-12687][Runtime / 
Operators] ByteHashSet is always in dense mode
URL: https://github.com/apache/flink/pull/8579#discussion_r289705832
 
 

 ##########
 File path: 
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/util/collections/ByteHashSet.java
 ##########
 @@ -43,109 +39,18 @@ public ByteHashSet() {
        }
 
        public boolean add(final byte k) {
-               if (k == 0) {
-                       if (this.containsZero) {
-                               return false;
-                       }
-
-                       this.containsZero = true;
+               if (used[k - min]) {
 
 Review comment:
   Just simplify it: `return !used[k - min] && (used[k - min] = true);`

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to