From f1d549d22f6e4c2c47b5f0e1b3d881d0505171f6 Mon Sep 17 00:00:00 2001 From: starlord Date: Mon, 14 Oct 2019 15:13:50 +0800 Subject: [PATCH 1/2] fix build error Former-commit-id: bfdde4eb57a2be02a87bb989859ece66e6289915 --- core/src/db/meta/MetaTypes.h | 5 ----- .../knowhere/index/vector_index/IndexIVFSQHybrid.cpp | 8 +++++++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/core/src/db/meta/MetaTypes.h b/core/src/db/meta/MetaTypes.h index c6a6b6ae87..c973f3fdea 100644 --- a/core/src/db/meta/MetaTypes.h +++ b/core/src/db/meta/MetaTypes.h @@ -41,11 +41,6 @@ using DateT = int; const DateT EmptyDate = -1; using DatesT = std::vector; -struct DateRange { - DateT start_date_ = 0x1 << 32; - DateT end_date_ = 0; -}; - struct TableSchema { typedef enum { NORMAL, diff --git a/core/src/index/knowhere/knowhere/index/vector_index/IndexIVFSQHybrid.cpp b/core/src/index/knowhere/knowhere/index/vector_index/IndexIVFSQHybrid.cpp index 268b7fb9e3..45ef51c62a 100644 --- a/core/src/index/knowhere/knowhere/index/vector_index/IndexIVFSQHybrid.cpp +++ b/core/src/index/knowhere/knowhere/index/vector_index/IndexIVFSQHybrid.cpp @@ -256,8 +256,14 @@ void IVFSQHybrid::UnsetQuantizer() { } -void +VectorIndexPtr IVFSQHybrid::LoadData(const knowhere::QuantizerPtr& q, const Config& conf) { + return nullptr; +} + +std::pair +IVFSQHybrid::CopyCpuToGpuWithQuantizer(const int64_t& device_id, const Config& config) { + KNOWHERE_THROW_MSG("Not yet implemented"); } IndexModelPtr From 3b73e99b28394f4610a310c5e6a91be4644c2972 Mon Sep 17 00:00:00 2001 From: starlord Date: Mon, 14 Oct 2019 15:36:54 +0800 Subject: [PATCH 2/2] check insert vector count and id count Former-commit-id: bc2c5bd8e01271fb4f043d53e9c634e42b31ee64 --- core/src/server/grpc_impl/GrpcRequestTask.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/server/grpc_impl/GrpcRequestTask.cpp b/core/src/server/grpc_impl/GrpcRequestTask.cpp index 1279cbac9f..3172e73786 100644 --- a/core/src/server/grpc_impl/GrpcRequestTask.cpp +++ b/core/src/server/grpc_impl/GrpcRequestTask.cpp @@ -423,8 +423,8 @@ InsertTask::OnExecute() { return Status(SERVER_INVALID_ROWRECORD_ARRAY, "Row record array is empty"); } - if (!record_ids_->vector_id_array().empty()) { - if (record_ids_->vector_id_array().size() != insert_param_->row_record_array_size()) { + if (!insert_param_->row_id_array().empty()) { + if (insert_param_->row_id_array().size() != insert_param_->row_record_array_size()) { return Status(SERVER_ILLEGAL_VECTOR_ID, "Size of vector ids is not equal to row record array size"); } }