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/02/19 22:03:30 UTC

[GitHub] [druid] jon-wei commented on a change in pull request #9367: string -> expression -> string -> expression

jon-wei commented on a change in pull request #9367: string -> expression -> string -> expression
URL: https://github.com/apache/druid/pull/9367#discussion_r381568909
 
 

 ##########
 File path: core/src/main/java/org/apache/druid/math/expr/ExprListenerImpl.java
 ##########
 @@ -109,9 +110,13 @@ public void exitDoubleExpr(ExprParser.DoubleExprContext ctx)
   @Override
   public void exitDoubleArray(ExprParser.DoubleArrayContext ctx)
   {
-    Double[] values = new Double[ctx.DOUBLE().size()];
+    Double[] values = new Double[ctx.doubleElement().size()];
     for (int i = 0; i < values.length; i++) {
-      values[i] = Double.parseDouble(ctx.DOUBLE(i).getText());
+      if (ctx.doubleElement(i).getText().equalsIgnoreCase("null")) {
 
 Review comment:
   This and similar blocks could use the NULL_LITERAL constant

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