You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/06/03 07:43:30 UTC

[GitHub] [flink] liyafan82 commented on a change in pull request #8579: [FLINK-12687][Runtime / Operators] ByteHashSet is always in dense mode

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:
users@infra.apache.org


With regards,
Apache Git Services