siddharthteotia commented on a change in pull request #5154: Fix the NPE for 
DISTINCT aggregation function when no record is selected
URL: https://github.com/apache/incubator-pinot/pull/5154#discussion_r394906767
 
 

 ##########
 File path: 
pinot-core/src/test/java/org/apache/pinot/queries/DistinctQueriesTest.java
 ##########
 @@ -685,6 +694,18 @@ public void testDistinctWithFilter()
         sortedResults.add(new Record(new Object[]{"California", "San Mateo", 
400000}));
         sortedResults.add(new Record(new Object[]{"California", "Sunnyvale", 
300000}));
         runQueryInterSegmentWithOrderBy(orderByQuery, sortedResults, new 
String[]{"State", "City", "SaleAmount"});
+
+        String emptyResultQuery =
 
 Review comment:
   I think this is the scenario when the overall result set of DISTINCT query 
at table level is empty and was throwing NPE as DistinctTable was null. 
   
   Can we please also add a test where the overall result at table level is 
non-empty but one or more segment returns empty?
   
   Then we have everything  covered.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to