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_r289720947
##########
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:
I have removed all but the default constructor, because it seems the
'expected' parameter is not used in the code.
----------------------------------------------------------------
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