Till Rohrmann created FLINK-3538: ------------------------------------ Summary: 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
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 (v6.3.4#6332)