Fix id field insert failed when auto_id is true (#5984)

Signed-off-by: fishpenguin <kun.yu@zilliz.com>
pull/5996/head
yukun 2021-06-22 18:46:04 +08:00 committed by GitHub
parent 14653846ba
commit 792dba4ae3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -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{