Re: Re: Re: Question about type cast in ExpressionReducer's reduce procedure

2017-06-29 Thread Jark Wu
Hi Aegeaner, I have replied you on FLINK-7036. Regards, Jark 2017-06-29 23:45 GMT+08:00 郭健 : > Thanks Jark, > I have captured the generated code as follow, noticed one line: `int > result$4;` , maybe it’s the result of ExpressionReducer’s type casting. > > > public

Re: Re: Re: Question about type cast in ExpressionReducer's reduce procedure

2017-06-29 Thread 郭健
Thanks Jark, I have captured the generated code as follow, noticed one line: `int result$4;` , maybe it’s the result of ExpressionReducer’s type casting. public class ExpressionReducer$6 extends org.apache.flink.api.common.functions.RichMapFunction { transient

Re: [外部邮件] Re: Question about type cast in ExpressionReducer's reduce procedure

2017-06-29 Thread Jark Wu
That's wired. Can you print the generated code ? Add this line before https://github.com/apache/flink/blob/master/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/ExpressionReducer.scala#L96 println(generatedFunction.code) 2017-06-29 14:50 GMT+08:00 郭健

Re: [外部邮件] Re: Question about type cast in ExpressionReducer's reduce procedure

2017-06-29 Thread 郭健
Hi Jark Wu, I did see the wrong result type failed the CodeGen compile stage, it throws out exception stack as follow, even before the ExpressionReducer actually restores the origin return type: org.apache.flink.api.common.InvalidProgramException: Table program cannot be compiled.

Question about type cast in ExpressionReducer's reduce procedure

2017-06-28 Thread 郭健
Hi all, I am implementing a STR_TO_DATE scalar SQL function to flink, and found return type casted from java.sql.Date to Integer in Flink’s ExpressionReducer: