Skip to content

Commit 8b8a73f

Browse files
author
Steinar H. Gunderson
committed
WL #13459: Optimize hash table in hash join
Post-push fix: Stop using the variable name “byte”, as it is a named type in C++17, and causes problems in at least Clang 10. Change-Id: I02f14f3b661c2a15d68fa086e8d36b331b706356
1 parent 75ec44e commit 8b8a73f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

sql/hash_join_buffer.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -531,9 +531,9 @@ std::pair<const char *, uint64_t> VarintParseSlow64(const char *p,
531531
uint32_t res32) {
532532
uint64_t res = res32;
533533
for (std::uint32_t i = 2; i < 10; i++) {
534-
uint64_t byte = static_cast<uint8_t>(p[i]);
535-
res += (byte - 1) << (7 * i);
536-
if (likely(byte < 128)) {
534+
uint64_t x = static_cast<uint8_t>(p[i]);
535+
res += (x - 1) << (7 * i);
536+
if (likely(x < 128)) {
537537
return {p + i + 1, res};
538538
}
539539
}

sql/immutable_string.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ inline const char *VarintParse64(const char *p, uint64_t *out) {
118118
*out = res;
119119
return p + 1;
120120
}
121-
uint32_t byte = ptr[1];
122-
res += (byte - 1) << 7;
123-
if (!(byte & 0x80)) {
121+
uint32_t x = ptr[1];
122+
res += (x - 1) << 7;
123+
if (!(x & 0x80)) {
124124
*out = res;
125125
return p + 2;
126126
}

0 commit comments

Comments
 (0)