From cf822902c9170f014c06e6d537ff20a864f56b37 Mon Sep 17 00:00:00 2001 From: "junjie.jiangjjj" Date: Mon, 13 May 2024 08:58:08 +0000 Subject: [PATCH] Fix parser bugs Signed-off-by: junjie.jiangjjj --- src/milvus_local.cpp | 9 --------- src/milvus_local.h | 5 ----- src/parser/parser.cc | 1 - src/parser/utils.h | 4 ++-- 4 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/milvus_local.cpp b/src/milvus_local.cpp index 976914d..b9d1275 100644 --- a/src/milvus_local.cpp +++ b/src/milvus_local.cpp @@ -285,15 +285,6 @@ MilvusLocal::Insert(const std::string& collection_name, return Status::Ok(); } -Status -MilvusLocal::Upsert(const std::string& collection_name, - const Rows& rows, - std::vector* ids) { - std::lock_guard lock(mutex_); - CHECK_COLLECTION_EXIST(collection_name); - return Status::Ok(); -} - Status MilvusLocal::Retrieve(const std::string& collection_name, const std::string& plan, diff --git a/src/milvus_local.h b/src/milvus_local.h index bd0e231..f61176d 100644 --- a/src/milvus_local.h +++ b/src/milvus_local.h @@ -88,11 +88,6 @@ class MilvusLocal final : NonCopyableNonMovable { const Rows& rows, std::vector* ids); - Status - Upsert(const std::string& collection_name, - const Rows& rows, - std::vector* ids); - Status Retrieve(const std::string& collection_name, const std::string& expr, diff --git a/src/parser/parser.cc b/src/parser/parser.cc index fff95ad..476913f 100644 --- a/src/parser/parser.cc +++ b/src/parser/parser.cc @@ -39,7 +39,6 @@ ParseIdentifier(milvus::local::SchemaHelper helper, auto expr = google::protobuf::Arena::CreateMessage(NULL); - assert(expr->column_expr().has_info()); expr->ParseFromString(ParserToMessage(*(helper.schema), identifier)); auto ret = std::make_shared(); diff --git a/src/parser/utils.h b/src/parser/utils.h index e983004..9a15d54 100644 --- a/src/parser/utils.h +++ b/src/parser/utils.h @@ -326,11 +326,11 @@ CreateSchemaHelper(proto::schema::CollectionSchema* schema) { schema_helper.name_offset[field.name()] = i; schema_helper.id_offset[field.fieldid()] = i; if (field.is_primary_key()) { - assert(schema_helper.primary_key_offset != -1); + assert(schema_helper.primary_key_offset == -1); schema_helper.primary_key_offset = i; } if (field.is_partition_key()) { - assert(schema_helper.primary_key_offset != -1); + assert(schema_helper.primary_key_offset == -1); schema_helper.partition_key_offset = i; } }