abhishekrb19 commented on code in PR #14560:
URL: https://github.com/apache/druid/pull/14560#discussion_r1261521502


##########
processing/src/main/java/org/apache/druid/query/metadata/SegmentMetadataQueryQueryToolChest.java:
##########
@@ -309,7 +325,7 @@ public static SegmentAnalysis mergeAnalyses(
 
     final Map<String, AggregatorFactory> aggregators = new HashMap<>();
 
-    if (lenientAggregatorMerge) {
+    if (AggregatorMergeStrategy.LENIENT == aggregatorMergeStrategy) {
       // Merge each aggregator individually, ignoring nulls
       for (SegmentAnalysis analysis : ImmutableList.of(arg1, arg2)) {

Review Comment:
   The existing null checks at the top of the function handle this. If either 
`arg1` or `arg2` is null, this function returns early:
   
   ```java
    if (arg1 == null) {
         return arg2;
    }
    if (arg2 == null) {
         return arg1;
    }
   ```



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

Reply via email to