gianm commented on a change in pull request #8099: Fix druid sql group by 
queries returning complex aggregation type
URL: https://github.com/apache/incubator-druid/pull/8099#discussion_r305520778
 
 

 ##########
 File path: sql/src/main/java/org/apache/druid/sql/calcite/rel/Projection.java
 ##########
 @@ -193,11 +194,14 @@ private static boolean postAggregatorDirectColumnIsOk(
       return false;
     }
 
-    // Check if a cast is necessary.
-    final ExprType toExprType = Expressions.exprTypeForValueType(
-        aggregateRowSignature.getColumnType(expression.getDirectColumn())
-    );
+    // We don't really have a way to cast complex type. So might as well not 
do anything and return.
+    final ValueType columnValueType = 
aggregateRowSignature.getColumnType(expression.getDirectColumn());
+    if (expression.isDirectColumnAccess() && columnValueType == 
ValueType.COMPLEX) {
 
 Review comment:
   That sounds fine, but could you please add the comment to the other PR's 
test then? The idea is that if a test is verifying that a bug was fixed it's 
good for it to link to the original issue.

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