capistrant commented on code in PR #13045:
URL: https://github.com/apache/druid/pull/13045#discussion_r965337263
##########
server/src/main/java/org/apache/druid/server/StatusResource.java:
##########
@@ -92,15 +96,15 @@ private Map<String, String> filterHiddenProperties(
Map<String, String> allProperties
)
{
- return Maps.filterEntries(
- allProperties,
- (entry) -> hiddenProperties
- .stream()
- .anyMatch(
- hiddenPropertyElement ->
-
!StringUtils.toLowerCase(entry.getKey()).contains(StringUtils.toLowerCase(hiddenPropertyElement))
- )
+ Map<String, String> propertyCopy = new HashMap<>(allProperties);
+ allProperties.keySet().forEach(
Review Comment:
Isn't this going to be O(N*M) regardless since for every hidden property we
would have to check every property and vice versa? In fact, for the current
implementation we sometimes get a short-circuit on the nested iteration since
it is using `anyMatch`.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]