jihoonson commented on a change in pull request #11853:
URL: https://github.com/apache/druid/pull/11853#discussion_r744075102



##########
File path: core/src/main/java/org/apache/druid/math/expr/ExprEval.java
##########
@@ -1129,6 +1032,10 @@ public String asString()
     public boolean isNumericNull()
     {
       if (isScalar()) {
+        if (arrayType.getElementType().is(ExprType.STRING)) {
+          Number n = computeNumber((String) getScalarValue());

Review comment:
       This seems a bit different than the use case you described though. The 
caller of this method will likely call another method to get the actual value 
after the null check using this method. It would be nice if the getValue method 
(like `asLong` or `asDouble`) can just return the cached value computed in this 
method instead of recomputing it.




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