diff --git a/internal/core/src/index/ScalarIndex-inl.h b/internal/core/src/index/ScalarIndex-inl.h index 0ca7f6f62f..8c799ef50c 100644 --- a/internal/core/src/index/ScalarIndex-inl.h +++ b/internal/core/src/index/ScalarIndex-inl.h @@ -67,7 +67,8 @@ inline void ScalarIndex::BuildWithRawData(size_t n, const void* values, const Config& config) { // TODO :: use arrow proto::schema::StringArray arr; - arr.ParseFromArray(values, n); + auto ok = arr.ParseFromArray(values, n); + Assert(ok); // TODO :: optimize here. avoid memory copy. std::vector vecs{arr.data().begin(), arr.data().end()}; @@ -78,7 +79,8 @@ template <> inline void ScalarIndex::BuildWithRawData(size_t n, const void* values, const Config& config) { proto::schema::BoolArray arr; - arr.ParseFromArray(values, n); + auto ok = arr.ParseFromArray(values, n); + Assert(ok); Build(arr.data_size(), arr.data().data()); }