[bugfix]ColumnDecimal missed some interfaces about pre-serialization (#10751)
This commit is contained in:
@ -58,6 +58,32 @@ const char* ColumnDecimal<T>::deserialize_and_insert_from_arena(const char* pos)
|
||||
return pos + sizeof(T);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
size_t ColumnDecimal<T>::get_max_row_byte_size() const {
|
||||
return sizeof(T);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void ColumnDecimal<T>::serialize_vec(std::vector<StringRef>& keys, size_t num_rows,
|
||||
size_t max_row_byte_size) const {
|
||||
for (size_t i = 0; i < num_rows; ++i) {
|
||||
memcpy(const_cast<char*>(keys[i].data + keys[i].size), &data[i], sizeof(T));
|
||||
keys[i].size += sizeof(T);
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void ColumnDecimal<T>::serialize_vec_with_null_map(std::vector<StringRef>& keys, size_t num_rows,
|
||||
const uint8_t* null_map,
|
||||
size_t max_row_byte_size) const {
|
||||
for (size_t i = 0; i < num_rows; ++i) {
|
||||
if (null_map[i] == 0) {
|
||||
memcpy(const_cast<char*>(keys[i].data + keys[i].size), &data[i], sizeof(T));
|
||||
keys[i].size += sizeof(T);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
UInt64 ColumnDecimal<T>::get64(size_t n) const {
|
||||
if constexpr (sizeof(T) > sizeof(UInt64)) {
|
||||
|
||||
@ -140,6 +140,16 @@ public:
|
||||
|
||||
StringRef serialize_value_into_arena(size_t n, Arena& arena, char const*& begin) const override;
|
||||
const char* deserialize_and_insert_from_arena(const char* pos) override;
|
||||
|
||||
virtual size_t get_max_row_byte_size() const override;
|
||||
|
||||
virtual void serialize_vec(std::vector<StringRef>& keys, size_t num_rows,
|
||||
size_t max_row_byte_size) const override;
|
||||
|
||||
virtual void serialize_vec_with_null_map(std::vector<StringRef>& keys, size_t num_rows,
|
||||
const uint8_t* null_map,
|
||||
size_t max_row_byte_size) const override;
|
||||
|
||||
void update_hash_with_value(size_t n, SipHash& hash) const override;
|
||||
int compare_at(size_t n, size_t m, const IColumn& rhs_, int nan_direction_hint) const override;
|
||||
void get_permutation(bool reverse, size_t limit, int nan_direction_hint,
|
||||
|
||||
Reference in New Issue
Block a user