Github user satishd commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1141#discussion_r53937034
  
    --- Diff: 
external/sql/storm-sql-core/src/jvm/org/apache/storm/sql/compiler/ExprCompiler.java
 ---
    @@ -234,14 +253,20 @@ public String translate(ExprCompiler compiler, 
RexCall call) {
                   pw.print(String.format("else if (%2$s == null) { %1$s = 
null; }\n", val, arg));
                 }
               }
    -          String calc = printMethodCall(method.method, args);
    -          pw.print(String.format("else { %1$s = %2$s; }\n", val, calc));
    +          String calc = printMethodCall(method, args);
    +          String valCast = compiler.javaTypeName(call);
    +          pw.print(String.format("else { %1$s = (%2$s)%3$s; }\n", val, 
valCast, calc));
    --- End diff --
    
    It seems there is no need to cast here. Tried with supported functions and 
UDF and it is working fine without casting. You may want to remove this as 
casting in generating code looks redundant. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to