This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.1 by this push:
     new 4ac82694575 [branch-4.1](be) Move #include directives outside 
namespace blocks to avoid ODR violations (#62871) (#63071)
4ac82694575 is described below

commit 4ac826945759f83e4c0ced51ded448b54e6f07cc
Author: Chenyang Sun <[email protected]>
AuthorDate: Sat May 9 15:12:59 2026 +0800

    [branch-4.1](be) Move #include directives outside namespace blocks to avoid 
ODR violations (#62871) (#63071)
---
 be/src/exec/common/sip_hash.h                                       | 3 +--
 be/src/exprs/table_function/vexplode_v2.cpp                         | 2 +-
 .../storage/segment/variant/variant_doc_snpashot_compact_iterator.h | 5 +++--
 be/src/util/hash/murmur_hash3.cpp                                   | 6 ++++--
 be/src/util/simd/vstring_function.h                                 | 1 -
 5 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/be/src/exec/common/sip_hash.h b/be/src/exec/common/sip_hash.h
index 865d0687435..9969d25b5e5 100644
--- a/be/src/exec/common/sip_hash.h
+++ b/be/src/exec/common/sip_hash.h
@@ -33,6 +33,7 @@
   * (~ 700 MB/sec, 15 million strings per second)
   */
 
+#include <cstddef>
 #include <string>
 #include <type_traits>
 
@@ -210,8 +211,6 @@ public:
 #undef ROTL
 #undef SIPROUND
 
-#include <cstddef>
-
 inline void sip_hash128(const char* data, const size_t size, char* out) {
     SipHash hash;
     hash.update(data, size);
diff --git a/be/src/exprs/table_function/vexplode_v2.cpp 
b/be/src/exprs/table_function/vexplode_v2.cpp
index 55be4fdf29a..d696e062476 100644
--- a/be/src/exprs/table_function/vexplode_v2.cpp
+++ b/be/src/exprs/table_function/vexplode_v2.cpp
@@ -30,6 +30,7 @@
 #include "core/column/column.h"
 #include "core/column/column_array.h"
 #include "core/column/column_nothing.h"
+#include "core/column/column_struct.h"
 #include "core/column/column_variant.h"
 #include "core/data_type/data_type.h"
 #include "core/data_type/data_type_array.h"
@@ -42,7 +43,6 @@
 namespace doris {
 
 #include "common/compile_check_begin.h"
-#include "core/column/column_struct.h"
 
 VExplodeV2TableFunction::VExplodeV2TableFunction() {
     _fn_name = "vexplode";
diff --git 
a/be/src/storage/segment/variant/variant_doc_snpashot_compact_iterator.h 
b/be/src/storage/segment/variant/variant_doc_snpashot_compact_iterator.h
index 6199c74eccc..ae524630a1a 100644
--- a/be/src/storage/segment/variant/variant_doc_snpashot_compact_iterator.h
+++ b/be/src/storage/segment/variant/variant_doc_snpashot_compact_iterator.h
@@ -15,11 +15,12 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include "core/column/column_variant.h"
+#include "storage/segment/column_reader.h"
+
 namespace doris::segment_v2 {
 
 #include "common/compile_check_begin.h"
-#include "core/column/column_variant.h"
-#include "storage/segment/column_reader.h"
 
 class VariantDocValueCompactIterator : public ColumnIterator {
 public:
diff --git a/be/src/util/hash/murmur_hash3.cpp 
b/be/src/util/hash/murmur_hash3.cpp
index 9dbb097c63e..eebb942a563 100644
--- a/be/src/util/hash/murmur_hash3.cpp
+++ b/be/src/util/hash/murmur_hash3.cpp
@@ -26,6 +26,10 @@
 
 #include "util/hash/murmur_hash3.h"
 
+#if defined(_MSC_VER)
+#include <stdlib.h>
+#endif
+
 #include "util/unaligned.h"
 
 namespace doris {
@@ -35,8 +39,6 @@ namespace doris {
 
 #define FORCE_INLINE __forceinline
 
-#include <stdlib.h>
-
 #define ROTL32(x, y) _rotl(x, y)
 #define ROTL64(x, y) _rotl64(x, y)
 
diff --git a/be/src/util/simd/vstring_function.h 
b/be/src/util/simd/vstring_function.h
index 02bd4ab267c..3c9648c2933 100644
--- a/be/src/util/simd/vstring_function.h
+++ b/be/src/util/simd/vstring_function.h
@@ -71,7 +71,6 @@ inline bool validate_ascii_fast(const char* src, size_t len) {
 }
 
 #ifdef __AVX2__
-#include <x86intrin.h>
 // The function returns true (1) if all chars passed in src are
 // 7-bit values (0x00..0x7F). Otherwise, it returns false (0).
 inline bool validate_ascii_fast_avx(const char* src, size_t len) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to