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
commit 85b077e32c54af01e247c22b2762ff0acfe1cf9a Author: Mryange <59914473+mrya...@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-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org