Skip to content

Commit

Permalink
field stringtype maxlength raise to 1M
Browse files Browse the repository at this point in the history
Signed-off-by: Xianhui.Lin <[email protected]>
  • Loading branch information
JsDove committed Dec 19, 2024
1 parent 6fa7505 commit bd91bf1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/proxy/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,7 @@ func (t *alterCollectionFieldTask) PreExecute(ctx context.Context) error {
}

if value > defaultMaxVarCharLength {
return merr.WrapErrParameterInvalid("%s exceeds the maximum allowed value 65535", prop.Value)
return merr.WrapErrParameterInvalid("%s exceeds the maximum allowed value 1048576", prop.Value)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions internal/proxy/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const (
// enableMultipleVectorFields indicates whether to enable multiple vector fields.
enableMultipleVectorFields = true

defaultMaxVarCharLength = 65535
defaultMaxVarCharLength = 1048576

defaultMaxArrayCapacity = 4096

Expand Down Expand Up @@ -365,7 +365,7 @@ func validateMaxLengthPerRow(collectionName string, field *schemapb.FieldSchema)
return err
}
if maxLengthPerRow > defaultMaxVarCharLength || maxLengthPerRow <= 0 {
return merr.WrapErrParameterInvalidMsg("the maximum length specified for a VarChar should be in (0, 65535]")
return merr.WrapErrParameterInvalidMsg("the maximum length specified for a VarChar should be in (0, 1048576]")
}
exist = true
}
Expand Down

0 comments on commit bd91bf1

Please sign in to comment.