diff --git a/internal/core/src/exec/operator/groupby/SearchGroupByOperator.h b/internal/core/src/exec/operator/groupby/SearchGroupByOperator.h index 6de135fb9cf7c..3a91bb1828818 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); + } } };