Bankim Bhavsar has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/14934 )

Change subject: [util] Import FastHash hash function to util
......................................................................


Patch Set 3:

(16 comments)

http://gerrit.cloudera.org:8080/#/c/14934/1/src/kudu/util/hash_util-test.cc
File src/kudu/util/hash_util-test.cc:

http://gerrit.cloudera.org:8080/#/c/14934/1/src/kudu/util/hash_util-test.cc@51
PS1, Line 51:   hash = HashUtil::FastHash64("abcdefg", 7, 0);
> warning: 7 is a magic number; consider replacing it with a named constant [
Done


http://gerrit.cloudera.org:8080/#/c/14934/1/src/kudu/util/hash_util-test.cc@54
PS1, Line 54:   hash = HashUtil::FastHash64("quick brown fox", 15, 42);
> warning: 15 is a magic number; consider replacing it with a named constant
Done


http://gerrit.cloudera.org:8080/#/c/14934/1/src/kudu/util/hash_util-test.cc@64
PS1, Line 64:   hash = HashUtil::FastHash32("abcdefg", 7, 0);
> warning: 7 is a magic number; consider replacing it with a named constant [
Done


http://gerrit.cloudera.org:8080/#/c/14934/1/src/kudu/util/hash_util-test.cc@67
PS1, Line 67:   hash = HashUtil::FastHash32("quick brown fox", 15, 42);
> warning: 42 is a magic number; consider replacing it with a named constant
Done


http://gerrit.cloudera.org:8080/#/c/14934/1/src/kudu/util/hash_util.h
File src/kudu/util/hash_util.h:

http://gerrit.cloudera.org:8080/#/c/14934/1/src/kudu/util/hash_util.h@75
PS1, Line 75:     const uint64_t* pos = static_cast<const uint64_t *>(buf);
> warning: 8 is a magic number; consider replacing it with a named constant [
Addressed by fixing the .clang-tidy config file.
https://gerrit.cloudera.org/c/14940/1


http://gerrit.cloudera.org:8080/#/c/14934/1/src/kudu/util/hash_util.h@88
PS1, Line 88:
> warning: 7 is a magic number; consider replacing it with a named constant [
Done


http://gerrit.cloudera.org:8080/#/c/14934/1/src/kudu/util/hash_util.h@89
PS1, Line 89:     switch (len & 7) {
> warning: 7 is a magic number; consider replacing it with a named constant [
Done


http://gerrit.cloudera.org:8080/#/c/14934/1/src/kudu/util/hash_util.h@90
PS1, Line 90:       case 7: v ^= static_cast<uint64_t>(pos2[6]) << 48;
> warning: 5 is a magic number; consider replacing it with a named constant [
Done


http://gerrit.cloudera.org:8080/#/c/14934/1/src/kudu/util/hash_util.h@91
PS1, Line 91:       case 6: v ^= static_cast<uint64_t>(pos2[5]) << 40;
> warning: 32 is a magic number; consider replacing it with a named constant
Done


http://gerrit.cloudera.org:8080/#/c/14934/1/src/kudu/util/hash_util.h@92
PS1, Line 92:       case 5: v ^= static_cast<uint64_t>(pos2[4]) << 32;
> warning: 24 is a magic number; consider replacing it with a named constant
Done


http://gerrit.cloudera.org:8080/#/c/14934/1/src/kudu/util/hash_util.h@93
PS1, Line 93:       case 4: v ^= static_cast<uint64_t>(pos2[3]) << 24;
> warning: 16 is a magic number; consider replacing it with a named constant
Done


http://gerrit.cloudera.org:8080/#/c/14934/1/src/kudu/util/hash_util.h@94
PS1, Line 94:       case 3: v ^= static_cast<uint64_t>(pos2[2]) << 16;
> warning: 8 is a magic number; consider replacing it with a named constant [
Done


http://gerrit.cloudera.org:8080/#/c/14934/1/src/kudu/util/hash_util.h@109
PS1, Line 109:     uint64_t h = FastHash64(buf, len, seed);
> warning: 32 is a magic number; consider replacing it with a named constant
Done


http://gerrit.cloudera.org:8080/#/c/14934/1/src/kudu/util/hash_util.h@115
PS1, Line 115:   ATTRIBUTE_NO_SANITIZE_INTEGER
> warning: 23 is a magic number; consider replacing it with a named constant
Done


http://gerrit.cloudera.org:8080/#/c/14934/1/src/kudu/util/hash_util.h@116
PS1, Line 116:   static inline uint64_t FastHashMix(uint64_t h) {
> warning: 0x2127599bf4325c37UL is a magic number; consider replacing it with
Done


http://gerrit.cloudera.org:8080/#/c/14934/1/src/kudu/util/hash_util.h@117
PS1, Line 117:     h ^= h >> 23;
> warning: 47 is a magic number; consider replacing it with a named constant
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id0a21d6af10d9ba0dbd9ab46d73552d42976e8d7
Gerrit-Change-Number: 14934
Gerrit-PatchSet: 3
Gerrit-Owner: Bankim Bhavsar <[email protected]>
Gerrit-Reviewer: Bankim Bhavsar <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Fri, 20 Dec 2019 20:05:24 +0000
Gerrit-HasComments: Yes

Reply via email to