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

 ##########
 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:
   Thanks for the good suggestion. Your code is definitely more efficient.

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