Adar Dembo has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/15600 )

Change subject: [util] Add special handling for nullptr in fast hash
......................................................................

[util] Add special handling for nullptr in fast hash

Importing special handling for nullptr from Impala that helps distinguish
between nullptr with possibly non-zero length input and empty object.
https://github.com/apache/impala/blob/master/be/src/runtime/raw-value.inline.h#L40
https://github.com/apache/impala/blob/master/be/src/runtime/raw-value-ir.cc#L179

Fast hash already handles zero-length input and hence no special handling
for zero length input.

Fast hash is currently only used for BlockBloomFilter and hence no backward
compatibility concerns. Don't plan to use Murmur2 hash with BlockBloomFilter
and hence not importing the same logic for Murmur2 or other hash functions.
Importing the same logic for other hash functions will require taking backward
compatibility into account.

Additionally this change updates Java implementation of Fast hash
to drop the explicit "len" parameter as arrays in Java include length.

Change-Id: Idf1ccff3dde7ccf54c4c2c6c2910915c69153316
Reviewed-on: http://gerrit.cloudera.org:8080/15600
Reviewed-by: Wenzhe Zhou <[email protected]>
Reviewed-by: Adar Dembo <[email protected]>
Tested-by: Adar Dembo <[email protected]>
---
M java/kudu-client/src/main/java/org/apache/kudu/util/HashUtil.java
M java/kudu-client/src/test/java/org/apache/kudu/util/TestFashHash.java
M src/kudu/util/hash_util-test.cc
M src/kudu/util/hash_util.h
4 files changed, 79 insertions(+), 14 deletions(-)

Approvals:
  Wenzhe Zhou: Looks good to me, but someone else must approve
  Adar Dembo: Looks good to me, approved; Verified

--
To view, visit http://gerrit.cloudera.org:8080/15600
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Idf1ccff3dde7ccf54c4c2c6c2910915c69153316
Gerrit-Change-Number: 15600
Gerrit-PatchSet: 4
Gerrit-Owner: Bankim Bhavsar <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Bankim Bhavsar <[email protected]>
Gerrit-Reviewer: Wenzhe Zhou <[email protected]>

Reply via email to