This is an automated email from the ASF dual-hosted git repository. kxiao pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/doris.git
commit d1ff72fa63fe182b4bef5c7e454b199af555679e Author: Mryange <59914473+mrya...@users.noreply.github.com> AuthorDate: Tue Jul 4 20:21:44 2023 +0800 [performance](group_concat) avoid extra copy in group_concat (#21432) avoid extra copy in group_concat --- 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 0e147de464..6438e65a20 100644 --- a/be/src/vec/aggregate_functions/aggregate_function_group_concat.h +++ b/be/src/vec/aggregate_functions/aggregate_function_group_concat.h @@ -73,7 +73,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); @@ -146,7 +146,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(); assert_cast<ColumnString&>(to).insert_data(result.c_str(), result.length()); } }; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org