You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/07/18 00:03:10 UTC

[GitHub] [incubator-druid] gianm commented on a change in pull request #8099: Fix druid sql group by queries returning complex aggregation type

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_r304688890
 
 

 ##########
 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:
   `expression.isDirectColumnAccess()` is already known true due to the check above, so isn't needed here.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org