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

panxiaolei pushed a commit to branch cp_0805
in repository https://gitbox.apache.org/repos/asf/doris.git

commit cf04ecc03f3662ccf1e08bc2687f49260d2cbf65
Author: Pxl <[email protected]>
AuthorDate: Sat Aug 3 14:38:13 2024 +0800

    [Bug](function) use emplace to replace insert_or_assign on stable distinct 
(#38776)
    
    ## Proposed changes
    use emplace to replace insert_or_assign on stable distinct
---
 be/src/vec/aggregate_functions/aggregate_function_distinct.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/be/src/vec/aggregate_functions/aggregate_function_distinct.h 
b/be/src/vec/aggregate_functions/aggregate_function_distinct.h
index 5eea0222d9a..4f42e8509f2 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_distinct.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_distinct.h
@@ -67,7 +67,7 @@ struct AggregateFunctionDistinctSingleNumericData {
     void add(const IColumn** columns, size_t /* columns_num */, size_t 
row_num, Arena*) {
         const auto& vec = assert_cast<const 
ColumnVector<T>&>(*columns[0]).get_data();
         if constexpr (stable) {
-            data.insert_or_assign(vec[row_num], data.size());
+            data.emplace(vec[row_num], data.size());
         } else {
             data.insert(vec[row_num]);
         }
@@ -170,7 +170,7 @@ struct AggregateFunctionDistinctSingleGenericData
         key.data = arena->insert(key.data, key.size);
 
         if constexpr (stable) {
-            data.insert_or_assign(key, data.size());
+            data.emplace(key, data.size());
         } else {
             typename Base::Container::LookupResult it;
             bool inserted;
@@ -214,7 +214,7 @@ struct AggregateFunctionDistinctMultipleGenericData
         }
 
         if constexpr (stable) {
-            data.insert_or_assign(key, data.size());
+            data.emplace(key, data.size());
         } else {
             typename Base::Container::LookupResult it;
             bool inserted;


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

Reply via email to