This is an automated email from the ASF dual-hosted git repository.
panxiaolei 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 81ee4d7402 [performance](group_concat) avoid extra copy in
group_concat (#21432)
81ee4d7402 is described below
commit 81ee4d74021120826c355a2e42d6b533a954fdf9
Author: Mryange <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]