rohangarg commented on a change in pull request #11949:
URL: https://github.com/apache/druid/pull/11949#discussion_r754998897
##########
File path:
sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/EarliestLatestAnySqlAggregator.java
##########
@@ -206,19 +195,74 @@ public Aggregation toDruidAggregation(
);
}
+ final String fieldName = getColumnName(plannerContext,
virtualColumnRegistry, args.get(0), rexNodes.get(0));
+
+ final AggregatorFactory theAggFactory;
+ switch (args.size()) {
+ case 1:
+ theAggFactory = aggregatorType.createAggregatorFactory(aggregatorName,
fieldName, null, outputType, -1);
+ break;
+ case 2:
+ if (outputType.anyOf(ValueType.STRING, ValueType.COMPLEX)) {
Review comment:
the if check you mention seems better to me - changed to that. also,
inlined the signature in the if-else block for better readability
--
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]