You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by chermenin <gi...@git.apache.org> on 2016/08/03 07:44:39 UTC

[GitHub] flink pull request #2328: [hotfix] Fix TypeExtractor.

GitHub user chermenin opened a pull request:

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

    [hotfix] Fix TypeExtractor.

    When function is a method reference to an instance method of an arbitrary object of a particular type it hasn't any parameters and getting of input type throws exception.
    
    For example this code
    
    ```
    environment.fromElements(1, 2, 3, 4, 5).map(Object::toString).print();
    ```
    
    throws exception: 
    
    ```
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1
    	at org.apache.flink.api.java.typeutils.TypeExtractor.getUnaryOperatorReturnType(TypeExtractor.java:350)
    	at org.apache.flink.api.java.typeutils.TypeExtractor.getUnaryOperatorReturnType(TypeExtractor.java:304)
    	at org.apache.flink.api.java.typeutils.TypeExtractor.getMapReturnTypes(TypeExtractor.java:119)
    	at org.apache.flink.api.java.DataSet.map(DataSet.java:215)
    	at ru.chermenin.flink.task.TestTask.main(TestTask.java:14)
    ```
    
    but this is executed normally:
    
    ```
    environment.fromElements(1, 2, 3, 4, 5).map(i -> i.toString()).print();
    ```

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

    $ git pull https://github.com/chermenin/flink master

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

    https://github.com/apache/flink/pull/2328.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 #2328
    
----
commit e5ca7a91e954043d8c217810b2004825ce68ee5e
Author: Alex Chermenin <al...@chermenin.ru>
Date:   2016-08-03T07:34:21Z

    [hotfix] Fix TypeExtractor.
    
    When function is a method reference to an instance method of an arbitrary object of a particular type it hasn't any parameters and getting of input type throws exception.

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #2328: [hotfix] Fix TypeExtractor.

Posted by twalthr <gi...@git.apache.org>.
Github user twalthr commented on the issue:

    https://github.com/apache/flink/pull/2328
  
    Your fix skips basically the input validation, I think we should still add some additional checks and some additional tests. I will open a PR for it. You can close this PR.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #2328: [hotfix] Fix TypeExtractor.

Posted by twalthr <gi...@git.apache.org>.
Github user twalthr commented on the issue:

    https://github.com/apache/flink/pull/2328
  
    Thanks for your PR. I will review it shortly.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #2328: [hotfix] Fix TypeExtractor.

Posted by chermenin <gi...@git.apache.org>.
Github user chermenin closed the pull request at:

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


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---