nickva commented on code in PR #5869:
URL: https://github.com/apache/couchdb/pull/5869#discussion_r2936280519
##########
src/mango/src/mango_selector.erl:
##########
@@ -575,7 +574,9 @@ match({[_, _ | _] = _Props} = Sel, _Value, _Cmp) ->
% match against.
has_required_fields(Selector, RequiredFields) ->
- Remainder = has_required_fields_int(Selector, RequiredFields),
+ Paths0 = [mango_util:parse_field(F) || F <- RequiredFields],
+ Paths = [P || {ok, P} <- Paths0],
Review Comment:
This will mask and any non `{ok, _}` responses. I don't think `parse_field`
currently can return anything else besides `{ok, _}` but if we ever change it,
it maybe be better to be explicit here and use `lists:map/2` function with an
exact match on `{ok, _}`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]