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_r394941139
##########
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:
Now that I think more about it, I don't think this solution will work for
the case when result from all segments on a single server is empty but across
the servers is non empty.
The current solution would have sent. a Distinct table from the server with
string types. However when the broker reduces distinct tables across server, it
might choose the result column types as string if the server that sent empty
distinct tables happens to be the 0th server. The broker has to decide the
result column types for.the final response and it does that upfront by looking
at the column types from first server's table since it assumes they will be the
same (they should be in general cases except for this corner case). This will
be wrong.
----------------------------------------------------------------
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]