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

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

GitHub user twalthr opened a pull request:

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

    [FLINK-5549] [core] TypeExtractor fails with RuntimeException, but should 
use GenericTypeInfo

    Fixes FLINK-5549.

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

    $ git pull https://github.com/twalthr/flink FLINK-5549

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

    https://github.com/apache/flink/pull/3154.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 #3154
    
----
commit 973170b1f04f151e80b88e3e6036fab80a3f707b
Author: twalthr <[email protected]>
Date:   2017-01-18T13:43:32Z

    [FLINK-5549] [core] TypeExtractor fails with RuntimeException, but should 
use GenericTypeInfo

----


> TypeExtractor fails with RuntimeException, but should use GenericTypeInfo
> -------------------------------------------------------------------------
>
>                 Key: FLINK-5549
>                 URL: https://issues.apache.org/jira/browse/FLINK-5549
>             Project: Flink
>          Issue Type: Bug
>          Components: Type Serialization System
>    Affects Versions: 1.2.0
>            Reporter: Robert Metzger
>            Assignee: Timo Walther
>
> This issue has been reported by a user on StackOverflow: 
> http://stackoverflow.com/questions/41700568/runtimeexception-when-using-flinks-mapfunction-with-cassandra-insert-but-not
> {code}
> Exception in thread "main" java.lang.RuntimeException: The field private 
> java.util.List com.datastax.driver.core.querybuilder.BuiltStatement.values is 
> already contained in the hierarchy of the class 
> com.datastax.driver.core.querybuilder.BuiltStatement.Please use unique field 
> names through your classes hierarchy
>     at 
> org.apache.flink.api.java.typeutils.TypeExtractor.getAllDeclaredFields(TypeExtractor.java:1762)
>     at 
> org.apache.flink.api.java.typeutils.TypeExtractor.analyzePojo(TypeExtractor.java:1683)
>     at 
> org.apache.flink.api.java.typeutils.TypeExtractor.privateGetForClass(TypeExtractor.java:1580)
>     at 
> org.apache.flink.api.java.typeutils.TypeExtractor.privateGetForClass(TypeExtractor.java:1479)
>     at 
> org.apache.flink.api.java.typeutils.TypeExtractor.createTypeInfoWithTypeHierarchy(TypeExtractor.java:737)
>     at 
> org.apache.flink.api.java.typeutils.TypeExtractor.privateCreateTypeInfo(TypeExtractor.java:565)
>     at 
> org.apache.flink.api.java.typeutils.TypeExtractor.getUnaryOperatorReturnType(TypeExtractor.java:366)
>     at 
> org.apache.flink.api.java.typeutils.TypeExtractor.getUnaryOperatorReturnType(TypeExtractor.java:305)
>     at 
> org.apache.flink.api.java.typeutils.TypeExtractor.getMapReturnTypes(TypeExtractor.java:120)
>     at 
> org.apache.flink.streaming.api.datastream.DataStream.map(DataStream.java:506)
>     at 
> se.hiq.bjornper.testenv.cassandra.SOCassandraQueryTest.main(SOCassandraQueryTest.java:51)
> {code}
> When Flink is trying to analyze the POJO, the {{getAllDeclaredFields}} method 
> fails with a RuntimeException. When the user is using a different class that 
> contains the POJO, it just uses the GenericTypeInfo which is able to 
> serialize the type.
> I think we need to throw a InvalidTypesException in the 
> {{getAllDeclaredFields}} method to fix the issue



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to