Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions be/src/vec/columns/column_complex.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,18 @@ class ColumnComplexType final : public COWHelper<IColumn, ColumnComplexType<T>>
__builtin_unreachable();
}

/// Do NOT remove these following two functions,
/// There are used by some `EngineChecksumTask::_compute_checksum()`.
// maybe we do not need to impl the function
void update_hash_with_value(size_t n, SipHash& hash) const override {
// TODO add hash function
}

void update_hashes_with_value(uint64_t* __restrict hashes,
const uint8_t* __restrict null_data = nullptr) const override {
// TODO add hash function
}

StringRef get_raw_data() const override {
return StringRef(reinterpret_cast<const char*>(data.data()), data.size());
}
Expand Down
20 changes: 20 additions & 0 deletions be/test/vec/core/column_complex_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -705,4 +705,24 @@ TEST(ColumnComplexTest, TestErase) {
EXPECT_EQ(column_test->size(), 4);
}

TEST(ColumnComplexTest, TestUpdateHashWithValue) {
using ColumnTest = ColumnComplexType<TYPE_BITMAP>;

auto column_test = ColumnTest::create();

column_test->data.push_back(BitmapValue {});
column_test->data.push_back(BitmapValue {});
column_test->data.push_back(BitmapValue {});
column_test->data.push_back(BitmapValue {});
column_test->data.push_back(BitmapValue {});

SipHash hash;
for (size_t i = 0; i < column_test->size(); ++i) {
column_test->update_hash_with_value(i, hash);
}

std::vector<uint64_t> hash_values(column_test->size());
column_test->update_hashes_with_value(hash_values.data());
}

} // namespace doris::vectorized
Loading