diff --git a/internal/core/src/query/GroupByOperator.h b/internal/core/src/query/GroupByOperator.h index b1d830a954fde..4ef1297bf1df5 100644 --- a/internal/core/src/query/GroupByOperator.h +++ b/internal/core/src/query/GroupByOperator.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); + } } };