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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]