Skip to content

Commit

Permalink
Fix branch lint
Browse files Browse the repository at this point in the history
Signed-off-by: Congqi Xia <[email protected]>
  • Loading branch information
congqixia committed Aug 16, 2024
1 parent db79555 commit 9e2965f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/util/typeutil/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,10 @@ func (helper *SchemaHelper) IsFieldLoaded(fieldID int64) bool {
func (helper *SchemaHelper) getDefaultJSONField(fieldName string) (*schemapb.FieldSchema, error) {
for _, f := range helper.schema.GetFields() {
if f.DataType == schemapb.DataType_JSON && f.IsDynamic {
if helper.IsFieldLoaded(f.GetFieldID()) {
return f, nil
} else {
if !helper.IsFieldLoaded(f.GetFieldID()) {
return nil, errors.Newf("field %s is dynamic but dynamic field is not loaded", fieldName)

Check warning on line 366 in pkg/util/typeutil/schema.go

View check run for this annotation

Codecov / codecov/patch

pkg/util/typeutil/schema.go#L366

Added line #L366 was not covered by tests
}
return f, nil
}
}
errMsg := fmt.Sprintf("field %s not exist", fieldName)
Expand Down

0 comments on commit 9e2965f

Please sign in to comment.