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

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


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new 7d50da93cb4 [fix](compile) fix macos compile failed (#44061) (#44201)
7d50da93cb4 is described below

commit 7d50da93cb47d8a3d137941a4fa5536e1f7d2c67
Author: 924060929 <[email protected]>
AuthorDate: Mon Nov 18 22:51:00 2024 +0800

    [fix](compile) fix macos compile failed (#44061) (#44201)
    
    fix macos compile failed, introduced by #40813, #42930, #43218, #43289
---
 be/src/vec/aggregate_functions/aggregate_function_approx_top_k.h   | 4 ++--
 be/src/vec/aggregate_functions/aggregate_function_approx_top_sum.h | 4 ++--
 be/src/vec/common/space_saving.h                                   | 6 +++---
 be/src/vec/exec/scan/scanner_context.cpp                           | 4 ++--
 be/src/vec/exprs/vruntimefilter_wrapper.h                          | 3 ++-
 5 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/be/src/vec/aggregate_functions/aggregate_function_approx_top_k.h 
b/be/src/vec/aggregate_functions/aggregate_function_approx_top_k.h
index 6a9b1636fa0..93ea3232c31 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_approx_top_k.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_approx_top_k.h
@@ -85,7 +85,7 @@ public:
     void deserialize(AggregateDataPtr __restrict place, BufferReadable& buf,
                      Arena* arena) const override {
         auto readStringBinaryInto = [](Arena& arena, BufferReadable& buf) {
-            size_t size = 0;
+            uint64_t size = 0;
             read_var_uint(size, buf);
 
             if (UNLIKELY(size > DEFAULT_MAX_STRING_SIZE)) {
@@ -101,7 +101,7 @@ public:
         auto& set = this->data(place).value;
         set.clear();
 
-        size_t size = 0;
+        uint64_t size = 0;
         read_var_uint(size, buf);
         if (UNLIKELY(size > TOP_K_MAX_SIZE)) {
             throw Exception(ErrorCode::INTERNAL_ERROR,
diff --git a/be/src/vec/aggregate_functions/aggregate_function_approx_top_sum.h 
b/be/src/vec/aggregate_functions/aggregate_function_approx_top_sum.h
index 9b3ba6a9650..12b89bd02b5 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_approx_top_sum.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_approx_top_sum.h
@@ -89,7 +89,7 @@ public:
     void deserialize(AggregateDataPtr __restrict place, BufferReadable& buf,
                      Arena* arena) const override {
         auto readStringBinaryInto = [](Arena& arena, BufferReadable& buf) {
-            size_t size = 0;
+            uint64_t size = 0;
             read_var_uint(size, buf);
 
             if (UNLIKELY(size > DEFAULT_MAX_STRING_SIZE)) {
@@ -105,7 +105,7 @@ public:
         auto& set = this->data(place).value;
         set.clear();
 
-        size_t size = 0;
+        uint64_t size = 0;
         read_var_uint(size, buf);
         if (UNLIKELY(size > TOP_K_MAX_SIZE)) {
             throw Exception(ErrorCode::INTERNAL_ERROR,
diff --git a/be/src/vec/common/space_saving.h b/be/src/vec/common/space_saving.h
index 18fa216228d..4a05ab2b409 100644
--- a/be/src/vec/common/space_saving.h
+++ b/be/src/vec/common/space_saving.h
@@ -244,10 +244,10 @@ public:
 
     void read(BufferReadable& rb) {
         destroy_elements();
-        size_t count = 0;
+        uint64_t count = 0;
         read_var_uint(count, rb);
 
-        for (size_t i = 0; i < count; ++i) {
+        for (UInt64 i = 0; i < count; ++i) {
             std::unique_ptr counter = std::make_unique<Counter>();
             counter->read(rb);
             counter->hash = counter_map.hash(counter->key);
@@ -259,7 +259,7 @@ public:
 
     // Reads the alpha map data from the provided readable buffer.
     void read_alpha_map(BufferReadable& rb) {
-        size_t alpha_size = 0;
+        uint64_t alpha_size = 0;
         read_var_uint(alpha_size, rb);
         for (size_t i = 0; i < alpha_size; ++i) {
             uint64_t alpha = 0;
diff --git a/be/src/vec/exec/scan/scanner_context.cpp 
b/be/src/vec/exec/scan/scanner_context.cpp
index d37d26b09f7..451b3561dad 100644
--- a/be/src/vec/exec/scan/scanner_context.cpp
+++ b/be/src/vec/exec/scan/scanner_context.cpp
@@ -233,7 +233,7 @@ vectorized::BlockUPtr ScannerContext::get_free_block(bool 
force) {
     if (_free_blocks.try_dequeue(block)) {
         DCHECK(block->mem_reuse());
         _block_memory_usage -= block->allocated_bytes();
-        _scanner_memory_used_counter->set(_block_memory_usage);
+        
_scanner_memory_used_counter->set(static_cast<int64_t>(_block_memory_usage));
         // A free block is reused, so the memory usage should be decreased
         // The caller of get_free_block will increase the memory usage
         update_peak_memory_usage(-block->allocated_bytes());
@@ -249,7 +249,7 @@ void 
ScannerContext::return_free_block(vectorized::BlockUPtr block) {
     if (block->mem_reuse() && _block_memory_usage < _max_bytes_in_queue) {
         size_t block_size_to_reuse = block->allocated_bytes();
         _block_memory_usage += block_size_to_reuse;
-        _scanner_memory_used_counter->set(_block_memory_usage);
+        
_scanner_memory_used_counter->set(static_cast<int64_t>(_block_memory_usage));
         block->clear_column_data();
         if (_free_blocks.enqueue(std::move(block))) {
             update_peak_memory_usage(block_size_to_reuse);
diff --git a/be/src/vec/exprs/vruntimefilter_wrapper.h 
b/be/src/vec/exprs/vruntimefilter_wrapper.h
index b75cb520ed4..16d79a78272 100644
--- a/be/src/vec/exprs/vruntimefilter_wrapper.h
+++ b/be/src/vec/exprs/vruntimefilter_wrapper.h
@@ -75,7 +75,8 @@ public:
     template <typename T, typename TT>
     static void judge_selectivity(double ignore_threshold, int64_t 
filter_rows, int64_t input_rows,
                                   T& always_true, TT& judge_counter) {
-        always_true = filter_rows / (input_rows * 1.0) < ignore_threshold;
+        always_true = static_cast<double>(filter_rows) / 
static_cast<double>(input_rows) <
+                      ignore_threshold;
         judge_counter = config::runtime_filter_sampling_frequency;
     }
 


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

Reply via email to