[ 
https://issues.apache.org/jira/browse/FLINK-6884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16045587#comment-16045587
 ] 

sunjincheng edited comment on FLINK-6884 at 6/10/17 4:58 PM:
-------------------------------------------------------------

Hi, [~dawidwys]  you are right, we can improve the error message, such as add 
the {{Arity value}}, {{expression number vaue}} ,{{result type}} and 
{{expressiongs}}. 
In fact there are a couple of exception message need to improved in 
`generateResultExpression` method. Such as 
* Arity of result type does not match number of expressions.
* Arity of result field names does not match number of expressions.
* Incompatible types of expression and result type.

So, I will improve those messages as much as possible. 

Best,
SunJincheng
 


was (Author: sunjincheng121):
Hi, [~dawidwys] Thanks for your reporting. you are right, we can improve the 
error message, such as add the {{Arity value}}, {{expression number vaue}} 
,{{result type}} and {{expressiongs}}. 
In fact there are a couple of exception message need to improved in 
`generateResultExpression` method. Such as 
* Arity of result type does not match number of expressions.
* Arity of result field names does not match number of expressions.
* Incompatible types of expression and result type.

So, I will improve those messages as much as possible. 

Best,
SunJincheng
 

> Incompatible TableSource#getReturnType and actual input type should fail 
> faster
> -------------------------------------------------------------------------------
>
>                 Key: FLINK-6884
>                 URL: https://issues.apache.org/jira/browse/FLINK-6884
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API & SQL
>    Affects Versions: 1.3.0
>            Reporter: Dawid Wysakowicz
>            Assignee: sunjincheng
>
> When a {{TableSource#getReturnType}} differs from the actual input type the 
> exception is thrown in code generation step with an exception that is hard to 
> track back:
> {code}
> org.apache.flink.table.codegen.CodeGenException: Arity of result type does 
> not match number of expressions.
>       at 
> org.apache.flink.table.codegen.CodeGenerator.generateResultExpression(CodeGenerator.scala:940)
>       at 
> org.apache.flink.table.codegen.CodeGenerator.generateConverterResultExpression(CodeGenerator.scala:883)
>       at 
> org.apache.flink.table.plan.nodes.CommonScan$class.generatedConversionFunction(CommonScan.scala:57)
>       at 
> org.apache.flink.table.plan.nodes.datastream.StreamTableSourceScan.generatedConversionFunction(StreamTableSourceScan.scala:35)
>       at 
> org.apache.flink.table.plan.nodes.datastream.StreamScan$class.convertToInternalRow(StreamScan.scala:48)
>       at 
> org.apache.flink.table.plan.nodes.datastream.StreamTableSourceScan.convertToInternalRow(StreamTableSourceScan.scala:35)
>       at 
> org.apache.flink.table.plan.nodes.datastream.StreamTableSourceScan.translateToPlan(StreamTableSourceScan.scala:107)
> {code}
> It would be nice if more meaningful exception was thrown earlier.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to