Skip to content

Commit

Permalink
fix:GrowingDataGetter get the wrong string data (#38015)
Browse files Browse the repository at this point in the history
issue: #37994
2.4 pr: #37995

Signed-off-by: cqy123456 <[email protected]>
  • Loading branch information
cqy123456 authored Dec 12, 2024
1 parent a514f83 commit b14a0c4
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ class GrowingDataGetter : public DataGetter<T> {

T
Get(int64_t idx) const {
return growing_raw_data_->operator[](idx);
if constexpr (std::is_same_v<std::string, T>) {
return T(growing_raw_data_->view_element(idx));
} else {
return growing_raw_data_->operator[](idx);
}
}
};

Expand Down

0 comments on commit b14a0c4

Please sign in to comment.