github-advanced-security[bot] commented on code in PR #15434:
URL: https://github.com/apache/druid/pull/15434#discussion_r1408715545
##########
sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/EarliestLatestAnySqlAggregator.java:
##########
@@ -244,37 +248,38 @@
final AggregatorFactory theAggFactory;
switch (args.size()) {
case 1:
- theAggFactory = aggregatorType.createAggregatorFactory(aggregatorName,
fieldName, null, outputType, null);
+ theAggFactory = aggregatorType.createAggregatorFactory(aggregatorName,
fieldName, null, outputType, null, true);
break;
case 2:
- int maxStringBytes;
- try {
- maxStringBytes = RexLiteral.intValue(rexNodes.get(1));
- }
- catch (AssertionError ae) {
- plannerContext.setPlanningError(
- "The second argument '%s' to function '%s' is not a number",
- rexNodes.get(1),
- aggregateCall.getName()
- );
- return null;
- }
+ Integer maxStringBytes = RexLiteral.intValue(rexNodes.get(1)); //
added not null check at the function
Review Comment:
## Boxed variable is never null
The variable 'maxStringBytes' is only assigned values of primitive type and
is never 'null', but it is declared with the boxed type 'Integer'.
[Show more
details](https://github.com/apache/druid/security/code-scanning/6013)
--
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]