From 792dba4ae340a96c2ba24b1de2ea6fd1518b08bf Mon Sep 17 00:00:00 2001 From: yukun Date: Tue, 22 Jun 2021 18:46:04 +0800 Subject: [PATCH] Fix id field insert failed when auto_id is true (#5984) Signed-off-by: fishpenguin --- internal/proxy/task.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/proxy/task.go b/internal/proxy/task.go index 25fa5e306..0dcd3c20f 100644 --- a/internal/proxy/task.go +++ b/internal/proxy/task.go @@ -450,7 +450,6 @@ func (it *InsertTask) checkFieldAutoID() error { autoIDFieldName := "" autoIDLoc := -1 primaryLoc := -1 - var fieldType schemapb.DataType fields := it.schema.Fields for loc, field := range fields { @@ -520,7 +519,7 @@ func (it *InsertTask) checkFieldAutoID() error { if autoIDLoc >= 0 { fieldData := schemapb.FieldData{ FieldName: primaryFieldName, - Type: fieldType, + Type: schemapb.DataType_Int64, Field: &schemapb.FieldData_Scalars{ Scalars: &schemapb.ScalarField{ Data: &schemapb.ScalarField_LongData{ -- GitLab