flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aljoscha Krettek (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (FLINK-3538) DataStream join API does not enforce consistent usage
Date Mon, 29 Feb 2016 19:39:18 GMT

     [ https://issues.apache.org/jira/browse/FLINK-3538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Aljoscha Krettek resolved FLINK-3538.
       Resolution: Fixed
    Fix Version/s: 1.0.0

Fixed in https://github.com/apache/flink/commit/0ac2b1a7b4b44d0e5722532958e5bda00615dbb4

> DataStream join API does not enforce consistent usage
> -----------------------------------------------------
>                 Key: FLINK-3538
>                 URL: https://issues.apache.org/jira/browse/FLINK-3538
>             Project: Flink
>          Issue Type: Improvement
>          Components: DataStream API, Scala API
>    Affects Versions: 1.0.0
>            Reporter: Till Rohrmann
>            Assignee: Aljoscha Krettek
>             Fix For: 1.0.0
> In the Scala DataStream API the {{join}} operation does not enforce that the user has
specified a {{KeySelector}} for both input sides before applying a window function. Moreover,
the order of the {{where}} and {{equalTo}} clause is not fixed and it is possible to specify
multiple {{where}} and {{equalTo}} clauses. In the latter case, it is not clear which {{KeySelector}}
will eventually be used by the system.
> So the following Flink programs compile without a compilation problem (the first two
lines will only fail at runtime):
> {code}
> inputA.join(inputB).equalTo{x => x}.window(TumblingProcessingTimeWindows.of(Time.seconds(10)))
>       .apply(new DefaultFlatJoinFunction[String, String]()).print()
> inputA.join(inputB).where{x => x}.window(TumblingProcessingTimeWindows.of(Time.seconds(10)))
>       .apply(new DefaultFlatJoinFunction[String, String]()).print()
> inputA.join(inputB).equalTo{x => x}.where{x => x}.where{x => "1"}.equalTo{x
=> "42"}.window(TumblingProcessingTimeWindows.of(Time.seconds(10)))
>       .apply(new DefaultFlatJoinFunction[String, String]()).print()
> {code}
> This is unlike the Java DataStream API where a clear pattern of {{join}} then {{where}}
and then {{equalTo}} is enforced. I would propose to do the same for the Scala API.

This message was sent by Atlassian JIRA

View raw message