diff --git a/be/src/vec/columns/column_complex.h b/be/src/vec/columns/column_complex.h index 7843c0dfece66c..8557900b7a0c78 100644 --- a/be/src/vec/columns/column_complex.h +++ b/be/src/vec/columns/column_complex.h @@ -192,6 +192,18 @@ class ColumnComplexType final : public COWHelper> __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(data.data()), data.size()); } diff --git a/be/test/vec/core/column_complex_test.cpp b/be/test/vec/core/column_complex_test.cpp index 5f5b20831143a5..a1167c68df5136 100644 --- a/be/test/vec/core/column_complex_test.cpp +++ b/be/test/vec/core/column_complex_test.cpp @@ -705,4 +705,24 @@ TEST(ColumnComplexTest, TestErase) { EXPECT_EQ(column_test->size(), 4); } +TEST(ColumnComplexTest, TestUpdateHashWithValue) { + using ColumnTest = ColumnComplexType; + + 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 hash_values(column_test->size()); + column_test->update_hashes_with_value(hash_values.data()); +} + } // namespace doris::vectorized