Skip to content

Commit

Permalink
Fix parser bugs
Browse files Browse the repository at this point in the history
Signed-off-by: junjie.jiangjjj <junjie.jiang@zilliz.com>
  • Loading branch information
junjiejiangjjj committed May 13, 2024
1 parent edb3e06 commit cf82290
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 17 deletions.
9 changes: 0 additions & 9 deletions src/milvus_local.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string>* ids) {
std::lock_guard<std::mutex> lock(mutex_);
CHECK_COLLECTION_EXIST(collection_name);
return Status::Ok();
}

Status
MilvusLocal::Retrieve(const std::string& collection_name,
const std::string& plan,
Expand Down
5 changes: 0 additions & 5 deletions src/milvus_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@ class MilvusLocal final : NonCopyableNonMovable {
const Rows& rows,
std::vector<std::string>* ids);

Status
Upsert(const std::string& collection_name,
const Rows& rows,
std::vector<std::string>* ids);

Status
Retrieve(const std::string& collection_name,
const std::string& expr,
Expand Down
1 change: 0 additions & 1 deletion src/parser/parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ ParseIdentifier(milvus::local::SchemaHelper helper,
auto expr =
google::protobuf::Arena::CreateMessage<milvus::proto::plan::Expr>(NULL);

assert(expr->column_expr().has_info());
expr->ParseFromString(ParserToMessage(*(helper.schema), identifier));

auto ret = std::make_shared<milvus::proto::plan::Expr>();
Expand Down
4 changes: 2 additions & 2 deletions src/parser/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit cf82290

Please sign in to comment.