kfaraz commented on code in PR #13151:
URL: https://github.com/apache/druid/pull/13151#discussion_r982233652
##########
sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/EarliestLatestAnySqlAggregator.java:
##########
@@ -202,12 +202,20 @@ public Aggregation toDruidAggregation(
theAggFactory = aggregatorType.createAggregatorFactory(aggregatorName,
fieldName, null, outputType, -1);
break;
case 2:
+ int maxStringBytes;
+ try {
+ maxStringBytes = RexLiteral.intValue(rexNodes.get(1));
+ }
+ catch (AssertionError ae) {
+ plannerContext.setPlanningError("The second argument '%s' to '%s'
function is not a literal", aggregateCall.getName(), rexNodes.get(1));
Review Comment:
Nit:
```suggestion
plannerContext.setPlanningError("The second argument '%s' to '%s'
function is not an integer", aggregateCall.getName(), rexNodes.get(1));
```
--
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]