kfaraz commented on code in PR #13151:
URL: https://github.com/apache/druid/pull/13151#discussion_r982240104


##########
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:
   We can also safely say that the argument should be an integer (maybe also 
mention the name of the argument) rather than saying that it should be a 
"literal".



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

Reply via email to