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 06:51:37 UTC

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

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_r289706004
 
 

 ##########
 File path: flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/util/collections/ByteHashSet.java
 ##########
 @@ -17,21 +17,17 @@
 
 package org.apache.flink.table.runtime.util.collections;
 
-import org.apache.flink.table.util.MurmurHashUtil;
-
 /**
  * Byte hash set.
  */
 public class ByteHashSet extends OptimizableHashSet {
 
-	private byte[] key;
-
-	private byte min = Byte.MAX_VALUE;
-	private byte max = Byte.MIN_VALUE;
+	private final byte min = Byte.MIN_VALUE;
+	private final byte max = Byte.MAX_VALUE;
 
 	public ByteHashSet(final int expected, final float f) {
 		super(expected, f);
-		this.key = new byte[this.n + 1];
+		used = new boolean[max - min + 1];
 	}
 
 	public ByteHashSet(final int expected) {
 
 Review comment:
   Just leave behind this `public ByteHashSet(final int expected)`, remove other useless constructor.

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