Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/15600 )
Change subject: [util] Add special handling for nullptr in fast hash ...................................................................... Patch Set 2: (1 comment) http://gerrit.cloudera.org:8080/#/c/15600/1/java/kudu-client/src/main/java/org/apache/kudu/util/HashUtil.java File java/kudu-client/src/main/java/org/apache/kudu/util/HashUtil.java: http://gerrit.cloudera.org:8080/#/c/15600/1/java/kudu-client/src/main/java/org/apache/kudu/util/HashUtil.java@24 PS1, Line 24: // Constant imported from Apache Impala used to compute hash values for special cases. : // Constant obtained by taking lower bytes of generated UUID. > > 1. What's the "generated UUID" you're alluding to? HASH_VAL_NULL is only 4 bytes though, and a UUID is typically 8 bytes. How was this generated? How is it guaranteed to be universally unique? This comment from Impala's raw-value.inline.h answers my question somewhat: /// Arbitrary constants used to compute hash values for special cases. Constants were /// obtained by taking lower bytes of generated UUID. NULL and empty strings should /// hash to different values. Could you work some of this information into this comment? Regarding the importance of the match, could you also work that into the comment? -- 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: comment Gerrit-Change-Id: Idf1ccff3dde7ccf54c4c2c6c2910915c69153316 Gerrit-Change-Number: 15600 Gerrit-PatchSet: 2 Gerrit-Owner: Bankim Bhavsar <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Bankim Bhavsar <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Wenzhe Zhou <[email protected]> Gerrit-Comment-Date: Mon, 30 Mar 2020 22:51:43 +0000 Gerrit-HasComments: Yes
