Skip to content

Commit

Permalink
remove auto-id check for upsert as it's supported now
Browse files Browse the repository at this point in the history
  • Loading branch information
nianliuu committed Dec 3, 2024
1 parent 3b778db commit a68e554
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/main/java/io/milvus/v2/utils/DataUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,6 @@ public UpsertRequest convertGrpcUpsertRequest(@NonNull UpsertReq requestParam,
DescribeCollectionResp descColl) {
String collectionName = requestParam.getCollectionName();

// currently, not allow to upsert for collection whose primary key is auto-generated
CreateCollectionReq.FieldSchema primaryField = descColl.getCollectionSchema().getField(descColl.getPrimaryFieldName());
if (primaryField.getAutoID() == Boolean.TRUE) {
throw new MilvusClientException(ErrorCode.INVALID_PARAMS, String.format("Upsert don't support autoID==True, collection: %s",
requestParam.getCollectionName()));
}

// generate upsert request builder
MsgBase msgBase = MsgBase.newBuilder().setMsgType(MsgType.Insert).build();
upsertBuilder = UpsertRequest.newBuilder()
Expand Down

0 comments on commit a68e554

Please sign in to comment.