flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-3444) env.fromElements relies on the first input element for determining the DataSet/DataStream type
Date Tue, 12 Apr 2016 05:39:25 GMT

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

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

Github user gallenvara commented on the pull request:

    https://github.com/apache/flink/pull/1857#issuecomment-208716571
  
    The error of CI build failure is not relevant with this PR.


> env.fromElements relies on the first input element for determining the DataSet/DataStream
type
> ----------------------------------------------------------------------------------------------
>
>                 Key: FLINK-3444
>                 URL: https://issues.apache.org/jira/browse/FLINK-3444
>             Project: Flink
>          Issue Type: Bug
>          Components: DataSet API, DataStream API
>    Affects Versions: 0.10.0, 1.0.0
>            Reporter: Vasia Kalavri
>
> The {{fromElements}} method of the {{ExecutionEnvironment}} and {{StreamExecutionEnvironment}}
determines the DataSet/DataStream type by extracting the type of the first input element.
> This is problematic if the first element is a subtype of another element in the collection.
> For example, the following
> {code}
> DataStream<Event> input = env.fromElements(new Event(1, "a"), new SubEvent(2, "b"));
> {code}
> succeeds, while the following
> {code}
> DataStream<Event> input = env.fromElements(new SubEvent(1, "a"), new Event(2, "b"));
> {code}
> fails with "java.lang.IllegalArgumentException: The elements in the collection are not
all subclasses of SubEvent".



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

Mime
View raw message