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

ASF GitHub Bot commented on FLINK-6884:
---------------------------------------

GitHub user sunjincheng121 opened a pull request:

    https://github.com/apache/flink/pull/4100

    [FLINK-6884][table] Improve confused exception information.

    Thanks for contributing to Apache Flink. Before you open your pull request, 
please take the following check list into consideration.
    If your changes take all of the items into account, feel free to open your 
pull request. For more information and/or questions please refer to the [How To 
Contribute guide](http://flink.apache.org/how-to-contribute.html).
    In addition to going through the list, please provide a meaningful 
description of your changes.
    
    - [x] General
      - The pull request references the related JIRA issue 
("[FLINK-6884][table] Improve confused exception information.")
      - The pull request addresses only one issue
      - Each commit in the PR has a meaningful commit message (including the 
JIRA id)
    
    - [ ] Documentation
      - Documentation has been added for new functionality
      - Old documentation affected by the pull request has been updated
      - JavaDoc for public methods has been added
    
    - [ ] Tests & Build
      - Functionality added by the pull request is covered by tests
      - `mvn clean verify` has been executed successfully locally or a Travis 
build has passed


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sunjincheng121/flink FLINK-6884-PR

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/4100.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4100
    
----
commit 6215b5d1606c39ca29b4897d0d4ffacdf30cc7cb
Author: sunjincheng121 <sunjincheng...@gmail.com>
Date:   2017-06-10T16:54:37Z

    [FLINK-6884][table] Improve confused exception information.

----


> 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