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_r379977353
 
 

 ##########
 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:
   why do we set them as String. we should use the type based on the response 
from the underlying block rt. Even if the block is empty, I think the dataTypes 
must be set properly.

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