siddharthteotia commented on code in PR #10054: URL: https://github.com/apache/pinot/pull/10054#discussion_r1066334375
########## pinot-core/src/test/java/org/apache/pinot/queries/ExplainPlanQueriesTest.java: ########## @@ -1680,6 +1680,16 @@ public void testSelectAggregate() { result4.add(new Object[]{"DOC_ID_SET", 6, 5}); result4.add(new Object[]{"FILTER_MATCH_ENTIRE_SEGMENT(docs:3)", 7, 6}); check(query4, new ResultTable(DATA_SCHEMA, result4)); + + // No scan required as metadata is sufficient to answer the query for all segments + String query5 = "EXPLAIN PLAN FOR SELECT DISTINCTSUM(invertedIndexCol1) FROM testTable"; + List<Object[]> result5 = new ArrayList<>(); + result5.add(new Object[]{"BROKER_REDUCE(limit:10)", 1, 0}); + result5.add(new Object[]{"COMBINE_AGGREGATE", 2, 1}); + result5.add(new Object[]{"PLAN_START(numSegmentsForThisPlan:4)", ExplainPlanRows.PLAN_START_IDS, + ExplainPlanRows.PLAN_START_IDS}); + result5.add(new Object[]{"AGGREGATE_NO_SCAN", 3, 2}); + check(query5, new ResultTable(DATA_SCHEMA, result5)); Review Comment: Can you add one test where the column on which we are doing `DISTINCTSUM / DISTINCTAVG` does not have the dictionary ? -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org