From 0c95d760fe3aaf671c68ca186005b98d35901ca5 Mon Sep 17 00:00:00 2001 From: Jerry Hu Date: Mon, 24 Apr 2023 08:36:52 +0800 Subject: [PATCH] [fix](fixed_hashtable) The incorrect implementation of copy constructor (#18921) --- be/src/vec/common/hash_table/fixed_hash_table.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/be/src/vec/common/hash_table/fixed_hash_table.h b/be/src/vec/common/hash_table/fixed_hash_table.h index 962beada45..310857afa8 100644 --- a/be/src/vec/common/hash_table/fixed_hash_table.h +++ b/be/src/vec/common/hash_table/fixed_hash_table.h @@ -200,8 +200,9 @@ public: destroy_elements(); free(); + const auto new_size = rhs.size(); std::swap(buf, rhs.buf); - this->set_size(rhs.size()); + this->set_size(new_size); Allocator::operator=(std::move(rhs)); Cell::State::operator=(std::move(rhs));