fix: [2.4] Pass full field list when partial load enabled (#37053) (#37063)

Cherry-pick from master
pr: #37053

Related to #37038

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/36423/head
congqixia 2024-10-23 11:03:28 +08:00 committed by GitHub
parent 415f2f47c0
commit 7eba3aa67e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 4 deletions

View File

@ -244,10 +244,6 @@ func NewCollection(collectionID int64, schema *schemapb.CollectionSchema, indexM
// otherwise use all fields for backward compatibility
if len(loadMetaInfo.GetLoadFields()) > 0 {
loadFieldIDs = typeutil.NewSet(loadMetaInfo.GetLoadFields()...)
loadSchema.Fields = lo.Filter(loadSchema.GetFields(), func(field *schemapb.FieldSchema, _ int) bool {
// system field shall always be loaded for now
return loadFieldIDs.Contain(field.GetFieldID()) || common.IsSystemField(field.GetFieldID())
})
} else {
loadFieldIDs = typeutil.NewSet(lo.Map(loadSchema.GetFields(), func(field *schemapb.FieldSchema, _ int) int64 { return field.GetFieldID() })...)
}