fix: Use proto.Equal to compare default value of field (#43813)

Related to #43796

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2025-08-11 20:01:42 +08:00 committed by GitHub
parent ebd517c514
commit 1ced768337
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,8 @@
package model
import (
"google.golang.org/protobuf/proto"
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
"github.com/milvus-io/milvus/pkg/v2/common"
@ -75,7 +77,7 @@ func (f *Field) Equal(other Field) bool {
f.IsPartitionKey == other.IsPartitionKey &&
f.IsDynamic == other.IsDynamic &&
f.IsClusteringKey == other.IsClusteringKey &&
f.DefaultValue == other.DefaultValue &&
proto.Equal(f.DefaultValue, other.DefaultValue) &&
f.ElementType == other.ElementType &&
f.IsFunctionOutput == other.IsFunctionOutput &&
f.Nullable == other.Nullable