[ https://issues.apache.org/jira/browse/STORM-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15162976#comment-15162976 ]
ASF GitHub Bot commented on STORM-1570: --------------------------------------- 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. > Support nested field lookup and user defined functions in Storm sql > ------------------------------------------------------------------- > > Key: STORM-1570 > URL: https://issues.apache.org/jira/browse/STORM-1570 > Project: Apache Storm > Issue Type: Improvement > Reporter: Arun Mahadevan > Assignee: Arun Mahadevan > -- This message was sent by Atlassian JIRA (v6.3.4#6332)