From b14a0c4bf50f8212f05bac4f1aa5eb5fcabd585f Mon Sep 17 00:00:00 2001 From: cqy123456 <39671710+cqy123456@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:50:42 +0800 Subject: [PATCH] fix:GrowingDataGetter get the wrong string data (#38015) issue: https://github.com/milvus-io/milvus/issues/37994 2.4 pr: https://github.com/milvus-io/milvus/pull/37995 Signed-off-by: cqy123456 --- .../core/src/exec/operator/groupby/SearchGroupByOperator.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/core/src/exec/operator/groupby/SearchGroupByOperator.h b/internal/core/src/exec/operator/groupby/SearchGroupByOperator.h index 6de135fb9c..3a91bb1828 100644 --- a/internal/core/src/exec/operator/groupby/SearchGroupByOperator.h +++ b/internal/core/src/exec/operator/groupby/SearchGroupByOperator.h @@ -50,7 +50,11 @@ class GrowingDataGetter : public DataGetter { T Get(int64_t idx) const { - return growing_raw_data_->operator[](idx); + if constexpr (std::is_same_v) { + return T(growing_raw_data_->view_element(idx)); + } else { + return growing_raw_data_->operator[](idx); + } } };