From 84b88ef3787784df5cb7df1426c12565998f3a3b Mon Sep 17 00:00:00 2001 From: cqy123456 Date: Mon, 25 Nov 2024 23:02:44 -0500 Subject: [PATCH] fix:[2.4]GrowingDataGetter get the wrong string data 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 838e80354422b..f70b64fc34c92 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); + } } };