Skip to content
Open
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
1 change: 1 addition & 0 deletions be/src/core/data_type_serde/data_type_number_serde.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "core/data_type/define_primitive_type.h"
#include "core/data_type/primitive_type.h"
#include "core/data_type_serde/data_type_serde.h"
#include "core/packed_int128.h"
#include "core/types.h"
#include "core/value/timestamptz_value.h"
#include "exprs/function/cast/cast_to_basic_number_common.h"
Expand Down
13 changes: 0 additions & 13 deletions be/src/core/data_type_serde/data_type_serde.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,19 +111,6 @@ struct FieldInfo {
int scale = 0;
int precision = 0;
};
struct PackedUInt128 {
// PackedInt128() : value(0) {}
PackedUInt128() = default;

PackedUInt128(const unsigned __int128& value_) { value = value_; }
PackedUInt128& operator=(const unsigned __int128& value_) {
value = value_;
return *this;
}
PackedUInt128& operator=(const PackedUInt128& rhs) = default;

uint128_t value;
} __attribute__((packed));

// Deserialize means read from different file format or memory format,
// for example read from arrow, read from parquet.
Expand Down
13 changes: 13 additions & 0 deletions be/src/core/packed_int128.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@ struct PackedInt128 {
__int128 value;
} __attribute__((packed));

struct PackedUInt128 {
PackedUInt128() = default;

PackedUInt128(const unsigned __int128& value_) { value = value_; }
PackedUInt128& operator=(const unsigned __int128& value_) {
value = value_;
return *this;
}
PackedUInt128& operator=(const PackedUInt128& rhs) = default;

uint128_t value;
} __attribute__((packed));

// unalign address directly casted to int128 will core dump
inline int128_t get_int128_from_unalign(const void* address) {
int128_t value = 0;
Expand Down