This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch 2.1-tmp in repository https://gitbox.apache.org/repos/asf/doris.git
commit 64127535176387f3349d4cb472e0c4e38f4bc2e3 Author: Pxl <pxl...@qq.com> AuthorDate: Sun Apr 7 14:44:51 2024 +0800 [improve](exec) reduce copy on store_string_ref (#33232) --- be/src/exprs/minmax_predicate.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/be/src/exprs/minmax_predicate.h b/be/src/exprs/minmax_predicate.h index ee73f67de83..cf746dc17cc 100644 --- a/be/src/exprs/minmax_predicate.h +++ b/be/src/exprs/minmax_predicate.h @@ -168,12 +168,16 @@ public: void store_string_ref() { if constexpr (std::is_same_v<T, StringRef>) { if constexpr (NeedMin) { - _stored_min = _min.to_string(); - _min = StringRef(_stored_min); + if (_min.data != _stored_min.data()) { + _stored_min = _min.to_string(); + _min = StringRef(_stored_min); + } } if constexpr (NeedMax) { - _stored_max = _max.to_string(); - _max = StringRef(_stored_max); + if (_max.data != _stored_max.data()) { + _stored_max = _max.to_string(); + _max = StringRef(_stored_max); + } } } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org