clintropolis commented on a change in pull request #9611: Use primitives
instead of boxed variables when possible
URL: https://github.com/apache/druid/pull/9611#discussion_r403434803
##########
File path: core/src/main/java/org/apache/druid/math/expr/Function.java
##########
@@ -1910,16 +1910,10 @@ public String name()
@Override
public ExprEval apply(List<Expr> args, Expr.ObjectBinding bindings)
{
- Long left = args.get(0).eval(bindings).asLong();
- Long right = args.get(1).eval(bindings).asLong();
+ long left = args.get(0).eval(bindings).asLong();
Review comment:
Hmm, I actually think this should probably be checking if either result
`isNumericNull` and returning a null result before calling `asLong`. Looking
around there are ... other places in the functions that have this issue as
well, so I don't think you need to fix here since that is a whole other can of
worms.
----------------------------------------------------------------
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]