Skip to content

Commit

Permalink
Handle returned error in select.go
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSisley committed Apr 11, 2023
1 parent 8613d86 commit 38e4a6b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions planner/select.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,18 @@ func (n *selectNode) initFields(selectReq *mapper.Select) ([]aggregateNode, erro
return nil, ErrGroupOutsideOfGroupBy
}
n.groupSelects = append(n.groupSelects, f)
} else if f.Name == request.LinksFieldName &&
(selectReq.Name == request.CommitsName || selectReq.Name == request.LatestCommitsName) &&
f.CollectionName == "" {
// no-op
// commit query link fields are always added and need no special treatment here
// WARNING: It is important to check collection name is nil and the parent select name
// here else we risk falsely identifying user defined fields with the name `links` as a commit links field
} else {
//nolint:errcheck
n.addTypeIndexJoin(f) // @TODO: ISSUE#158
err := n.addTypeIndexJoin(f)
if err != nil {
return nil, err
}
}
}
}
Expand Down

0 comments on commit 38e4a6b

Please sign in to comment.