Github user qiuchenjian commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/3000#discussion_r242851840
--- Diff:
datamap/bloom/src/main/java/org/apache/hadoop/util/bloom/CarbonBloomFilter.java
---
@@ -49,27 +49,23 @@ public CarbonBloomFilter(int vectorSize, int nbHash,
int hashType, boolean compr
@Override
public boolean membershipTest(Key key) {
- if (key == null) {
- throw new NullPointerException("key cannot be null");
- }
-
- int[] h = hash.hash(key);
- hash.clear();
if (compress) {
// If it is compressed check in roaring bitmap
+ if (key == null) {
--- End diff --
I think "key == null" can put out of the branch, because it can reduce one
function call. Although super.membershipTest also judge it
---