exceptionfactory commented on code in PR #6687:
URL: https://github.com/apache/nifi/pull/6687#discussion_r1052613646


##########
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/AbstractJsonQueryElasticsearch.java:
##########
@@ -281,8 +342,25 @@ private void handleAggregations(final Map<String, Object> 
aggregations, final Pr
         }
     }
 
+    @SuppressWarnings("unchecked")
+    private Map<String, Object> formatAggregations(final Map<String, Object> 
aggregations) {
+        final Map<String, Object> formattedAggregations;
+
+        if (AGGS_METADATA_ONLY.getValue().equals(aggregationFormat)) {
+            formattedAggregations = new HashMap<>(aggregations);

Review Comment:
   Recommend using `LinkedHashMap` for more deterministic results.
   ```suggestion
               formattedAggregations = new LinkedHashMap<>(aggregations);
   ```



-- 
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]

Reply via email to