kishoreg commented on a change in pull request #5075: Fix bug in DISTINCT for 
queries that return empty response 
URL: https://github.com/apache/incubator-pinot/pull/5075#discussion_r380990241
 
 

 ##########
 File path: 
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/DistinctAggregationFunction.java
 ##########
 @@ -139,6 +140,12 @@ public void aggregate(int length, AggregationResultHolder 
aggregationResultHolde
 
   @Override
   public DistinctTable extractAggregationResult(AggregationResultHolder 
aggregationResultHolder) {
+    if (_distinctTable == null) {
+      ColumnDataType[] columnDataTypes = new 
ColumnDataType[_columnNames.length];
+      Arrays.fill(columnDataTypes, ColumnDataType.STRING);
 
 Review comment:
   Cant think of a better solution other than this for now. Let's go with it. 
Make sure you check for size of the distinct table in the merge as well.

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