You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2023/07/17 16:02:33 UTC

[doris] branch branch-1.2-lts updated: [performance](group_concat) avoid extra copy in group_concat (#21880)

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

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
     new c8aa346553 [performance](group_concat) avoid extra copy in group_concat (#21880)
c8aa346553 is described below

commit c8aa346553ca83f6f036777bf0e00e837986619c
Author: Mryange <59...@users.noreply.github.com>
AuthorDate: Tue Jul 18 00:02:26 2023 +0800

    [performance](group_concat) avoid extra copy in group_concat (#21880)
    
    pick from #21432
---
 be/src/vec/aggregate_functions/aggregate_function_group_concat.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/be/src/vec/aggregate_functions/aggregate_function_group_concat.h b/be/src/vec/aggregate_functions/aggregate_function_group_concat.h
index 33c83fc7b0..fde7ef864d 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_group_concat.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_group_concat.h
@@ -58,7 +58,7 @@ struct AggregateFunctionGroupConcatData {
         }
     }
 
-    std::string get() const { return data; }
+    const std::string& get() const { return data; }
 
     void write(BufferWritable& buf) const {
         write_binary(data, buf);
@@ -132,7 +132,7 @@ public:
     }
 
     void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override {
-        std::string result = this->data(place).get();
+        const std::string& result = this->data(place).get();
         static_cast<ColumnString&>(to).insert_data(result.c_str(), result.length());
     }
 };


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