This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 5be8d57f52 [fix](be-ut) fix ColumnFixedLenghtObjectTest on 32 bits
system (#23519)
5be8d57f52 is described below
commit 5be8d57f522f6504c59c25d6350ba2981f90f172
Author: Jerry Hu <[email protected]>
AuthorDate: Mon Aug 28 14:02:05 2023 +0800
[fix](be-ut) fix ColumnFixedLenghtObjectTest on 32 bits system (#23519)
---
be/test/vec/columns/column_fixed_length_object_test.cpp | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/be/test/vec/columns/column_fixed_length_object_test.cpp
b/be/test/vec/columns/column_fixed_length_object_test.cpp
index 1f4b2d6d7f..fd0a3687d6 100644
--- a/be/test/vec/columns/column_fixed_length_object_test.cpp
+++ b/be/test/vec/columns/column_fixed_length_object_test.cpp
@@ -57,18 +57,20 @@ TEST(ColumnFixedLenghtObjectTest, InsertRangeFrom) {
}
TEST(ColumnFixedLenghtObjectTest, UpdateHashWithValue) {
- auto column1 = ColumnFixedLengthObject::create(sizeof(size_t));
- EXPECT_EQ(sizeof(size_t), column1->item_size());
+ auto column1 = ColumnFixedLengthObject::create(sizeof(int64_t));
+ EXPECT_EQ(sizeof(int64_t), column1->item_size());
const size_t count = 1000;
column1->resize(count);
auto& data = column1->get_data();
- for (size_t i = 0; i < count; ++i) {
- *((size_t*)&data[i * sizeof(size_t)]) = i;
+ for (size_t i = 0; i != count; ++i) {
+ *((int64_t*)&data[i * column1->item_size()]) = i;
}
SipHash hash1;
- column1->update_hash_with_value(count, hash1);
+ for (size_t i = 0; i != count; ++i) {
+ column1->update_hash_with_value(i, hash1);
+ }
auto column2 = ColumnVector<int64_t>::create();
column2->resize(count);
@@ -77,7 +79,9 @@ TEST(ColumnFixedLenghtObjectTest, UpdateHashWithValue) {
}
SipHash hash2;
- column2->update_hash_with_value(count, hash2);
+ for (size_t i = 0; i != count; ++i) {
+ column2->update_hash_with_value(i, hash2);
+ }
EXPECT_EQ(hash1.get64(), hash2.get64());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]