gortiz commented on code in PR #11453:
URL: https://github.com/apache/pinot/pull/11453#discussion_r1308318890


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/AggregateOperator.java:
##########
@@ -192,6 +194,8 @@ private TransferableBlock produceAggregatedBlock() {
       if (rows.isEmpty()) {
         return TransferableBlockUtils.getEndOfStreamTransferableBlock();
       } else {
+        ColumnDataType[] storedTypes = 
_resultSchema.getStoredColumnDataTypes();
+        rows.forEach(row -> TypeUtils.convertRow(row, storedTypes));

Review Comment:
   It is not clear to me why we add the conversion here. TBH the problem may be 
that is not clear to me when a value uses the stored type or the execution type.
   
   What happens if we have two aggregation stages? Something like:
   ```
   select distinct(c) from (
     select A, count() as c from T
       group by A
     ) as TableExpr
   ```
   
   Do we convert values twice?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to