Prechádzať zdrojové kódy

remove auto-id check for upsert as it's supported now

Signed-off-by: Nian Liu <nian.liu@zilliz.com>
Nian Liu 5 mesiacov pred
rodič
commit
c04d42bb7a

+ 0 - 7
src/main/java/io/milvus/v2/utils/DataUtils.java

@@ -60,13 +60,6 @@ public class DataUtils {
                                                       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()