jiahuili430 commented on code in PR #4414:
URL: https://github.com/apache/couchdb/pull/4414#discussion_r1142048628
##########
src/couch_mrview/src/couch_mrview_http.erl:
##########
@@ -486,8 +491,43 @@ parse_params(Props, Keys, #mrargs{} = Args0, Options) ->
Args0;
_ ->
% group_level set to undefined to detect if explicitly set by
user
- Args0#mrargs{keys = Keys, group = undefined, group_level =
undefined}
+ case Keys of
+ [_] ->
+ Args0#mrargs{group = undefined, group_level =
undefined};
+ _ ->
+ Args0#mrargs{keys = Keys, group = undefined,
group_level = undefined}
+ end
end,
+
+ PropsKeys = proplists:get_keys(Props),
+ case config:get_boolean("chttpd", "enable_key_exclusivity",
?DEFAULT_ENABLE_KEY_EXCLUSIVITY) of
Review Comment:
Agree. I tried with `timer:tc()`, `lists:any()` is more efficient.
```erl
% first time
Any: {0,true}
Foldl: {1,true}
Sets: {1770,true}
% second time
Any: {0,true}
Foldl: {1,true}
Sets: {12,true}
```
Thanks for showing me another way to check intersections.
--
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]