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 aef4694ee34 [refactor](be) Move PackedUInt128 to packed_int128.h
(#61250)
aef4694ee34 is described below
commit aef4694ee34931845b5e3a990177911ee3deb490
Author: Chenyang Sun <[email protected]>
AuthorDate: Fri Mar 13 14:11:56 2026 +0800
[refactor](be) Move PackedUInt128 to packed_int128.h (#61250)
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [x] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
---
be/src/core/data_type_serde/data_type_number_serde.cpp | 1 +
be/src/core/data_type_serde/data_type_serde.h | 13 -------------
be/src/core/packed_int128.h | 13 +++++++++++++
3 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/be/src/core/data_type_serde/data_type_number_serde.cpp
b/be/src/core/data_type_serde/data_type_number_serde.cpp
index a76bc39ca4d..6acb1bb9a16 100644
--- a/be/src/core/data_type_serde/data_type_number_serde.cpp
+++ b/be/src/core/data_type_serde/data_type_number_serde.cpp
@@ -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"
diff --git a/be/src/core/data_type_serde/data_type_serde.h
b/be/src/core/data_type_serde/data_type_serde.h
index 1f9ac312cce..656ef84b76b 100644
--- a/be/src/core/data_type_serde/data_type_serde.h
+++ b/be/src/core/data_type_serde/data_type_serde.h
@@ -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.
diff --git a/be/src/core/packed_int128.h b/be/src/core/packed_int128.h
index 07d595fdd03..ef59a8e7529 100644
--- a/be/src/core/packed_int128.h
+++ b/be/src/core/packed_int128.h
@@ -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;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]