You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/04/04 06:53:58 UTC

[GitHub] [druid] clintropolis commented on a change in pull request #9611: Use primitives instead of boxed variables when possible

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.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org