This is an automated email from the ASF dual-hosted git repository. dataroaring 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 e7e13bc338 [optimize](array function) array_apply fucntion vectorized compute column_filter loop (#17687) e7e13bc338 is described below commit e7e13bc338b7492d39e734aadc9e970c14180e13 Author: ZhangYu0123 <67053339+zhangyu0...@users.noreply.github.com> AuthorDate: Sun Mar 19 10:18:09 2023 +0800 [optimize](array function) array_apply fucntion vectorized compute column_filter loop (#17687) --- be/src/vec/functions/array/function_array_apply.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/be/src/vec/functions/array/function_array_apply.cpp b/be/src/vec/functions/array/function_array_apply.cpp index 3cace60982..723dfc143a 100644 --- a/be/src/vec/functions/array/function_array_apply.cpp +++ b/be/src/vec/functions/array/function_array_apply.cpp @@ -124,12 +124,10 @@ private: .get_raw_data() .data; } - for (size_t i = 0; i < src_column.size(); ++i) { - T lhs_val = *reinterpret_cast<const T*>(src_column_data_ptr); - if (apply<T, op>(lhs_val, rhs_val)) { - column_filter_data[i] = 1; - } - src_column_data_ptr += sizeof(T); + const T* src_column_data_t_ptr = reinterpret_cast<const T*>(src_column_data_ptr); + const size_t src_column_size = src_column.size(); + for (size_t i = 0; i < src_column_size; ++i) { + column_filter_data[i] = apply<T, op>(src_column_data_t_ptr[i], rhs_val); } const IColumn::Filter& filter = column_filter_data; ColumnPtr filtered = src_column.filter(filter, src_column.size()); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org