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

morrysnow 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 a19658ffdc9 [fix](compile) fix compile failed caused by std::min on 
MacOS (#36512)
a19658ffdc9 is described below

commit a19658ffdc96b12a0e8c689e72f4fb3d389ac924
Author: morrySnow <101034200+morrys...@users.noreply.github.com>
AuthorDate: Wed Jun 19 15:31:09 2024 +0800

    [fix](compile) fix compile failed caused by std::min on MacOS (#36512)
    
    doris/be/src/runtime/group_commit_mgr.cpp:153:57: error: no matching 
function for call to 'min'
            _get_cond.wait_for(l, 
std::chrono::milliseconds(std::min(left_milliseconds, 10000L)));
                                                            ^~~~~~~~
    /opt/homebrew/opt/llvm@16/bin/../include/c++/v1/__algorithm/min.h:40:1: 
note: candidate template ignored: deduced conflicting types for parameter '_Tp' 
('int64_t' (aka 'long long') vs. 'long')
    min(const _Tp& __a, const _Tp& __b)
    ^
    /opt/homebrew/opt/llvm@16/bin/../include/c++/v1/__algorithm/min.h:51:1: 
note: candidate template ignored: could not match 'initializer_list<_Tp>' 
against 'int64_t' (aka 'long long')
    min(initializer_list<_Tp> __t, _Compare __comp)
    ^
    /opt/homebrew/opt/llvm@16/bin/../include/c++/v1/__algorithm/min.h:60:1: 
note: candidate function template not viable: requires single argument '__t', 
but 2 arguments were provided
    min(initializer_list<_Tp> __t)
    ^
    /opt/homebrew/opt/llvm@16/bin/../include/c++/v1/__algorithm/min.h:31:1: 
note: candidate function template not viable: requires 3 arguments, but 2 were 
provided
    min(const _Tp& __a, const _Tp& __b, _Compare __comp)
    ^
    1 error generated.
    [364/961] Building CXX object 
src/olap/CMakeFiles/Olap.dir/tablet_reader.cpp.o
    ninja: build stopped: subcommand failed.
---
 be/src/runtime/group_commit_mgr.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/be/src/runtime/group_commit_mgr.cpp 
b/be/src/runtime/group_commit_mgr.cpp
index 6e81e3ae4c3..cf74674f705 100644
--- a/be/src/runtime/group_commit_mgr.cpp
+++ b/be/src/runtime/group_commit_mgr.cpp
@@ -150,7 +150,8 @@ Status LoadBlockQueue::get_block(RuntimeState* 
runtime_state, vectorized::Block*
                           << ", runtime_state=" << runtime_state;
             }
         }
-        _get_cond.wait_for(l, 
std::chrono::milliseconds(std::min(left_milliseconds, 10000L)));
+        _get_cond.wait_for(l, std::chrono::milliseconds(
+                                      std::min(left_milliseconds, 
static_cast<int64_t>(10000))));
     }
     if (runtime_state->is_cancelled()) {
         auto st = runtime_state->cancel_reason();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to