You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by Stephan Ewen <se...@apache.org> on 2016/01/17 21:23:30 UTC

Scala no-parenthesis methods on DataStream

Hi all!

I just noticed that all Scala DataStream methods like "rebalance",
"broadcast", "shuffle", etc are defined without parenthesis.

I am a bit puzzled about this. Even though these methods do not modify the
DataStream object on which they are called, they define for example a
distributed shuffle, which makes them not really side effect free.

I would define them with parenthesis. If we decide to do this, and since
this is API breaking, we should do it before 1.0

Greetings,
Stephan


PS: I suspect that this comes from the fact that IntelliJ has the annoying
behavior to define all methods with empty parenthesis by default as
no-parenthesis methods.

Re: Scala no-parenthesis methods on DataStream

Posted by Aljoscha Krettek <al...@apache.org>.
Hi,
I see what you mean and I would also feel that they could have parentheses? On the other hand, the methods are really side-effect free, they don’t modify the original stream in any way, they just just create a new “shuffle operator” that will affect operations performed on this shuffled stream.

Cheers,
Aljoscha
> On 17 Jan 2016, at 21:23, Stephan Ewen <se...@apache.org> wrote:
> 
> am