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):
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.