This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new 2e5126bdcfd branch-3.1: [Bug](function) fix wrong result about
array_agg_foreach #55075 (#55420)
2e5126bdcfd is described below
commit 2e5126bdcfd79a52721dff5b50f24f794f145f9a
Author: Pxl <[email protected]>
AuthorDate: Thu Sep 4 09:55:16 2025 +0800
branch-3.1: [Bug](function) fix wrong result about array_agg_foreach #55075
(#55420)
pick #55075
---
.../aggregate_functions/aggregate_function_collect.h | 20 ++------------------
1 file changed, 2 insertions(+), 18 deletions(-)
diff --git a/be/src/vec/aggregate_functions/aggregate_function_collect.h
b/be/src/vec/aggregate_functions/aggregate_function_collect.h
index 305fe3276c5..08a1f751206 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_collect.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_collect.h
@@ -471,15 +471,7 @@ struct AggregateFunctionArrayAggData {
}
void merge(const Self& rhs) {
- const auto size = rhs.null_map->size();
- null_map->resize(size);
- nested_column->reserve(size);
- for (size_t i = 0; i < size; i++) {
- const auto null_value = rhs.null_map->data()[i];
- const auto data_value = rhs.nested_column->get_data()[i];
- null_map->data()[i] = null_value;
- nested_column->get_data().push_back(data_value);
- }
+ column_data->insert_range_from(*rhs.column_data, 0,
rhs.column_data->size());
}
};
@@ -568,15 +560,7 @@ struct AggregateFunctionArrayAggData<StringRef> {
}
void merge(const Self& rhs) {
- const auto size = rhs.null_map->size();
- null_map->resize(size);
- nested_column->reserve(size);
- for (size_t i = 0; i < size; i++) {
- const auto null_value = rhs.null_map->data()[i];
- auto s = rhs.nested_column->get_data_at(i);
- null_map->data()[i] = null_value;
- nested_column->insert_data(s.data, s.size);
- }
+ column_data->insert_range_from(*rhs.column_data, 0,
rhs.column_data->size());
}
};
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]