Github user mbalassi commented on the issue:
https://github.com/apache/flink/pull/2094
We have gone through the changes with @ggevay and found that the
documentation is lacking or misleading in a couple of cases.
1. The DataStream API JavaDocs mention that one can aggregate on
expressions including Java Bean-like getters which is not true regardless of
this change. [1]
2. I think this is due to the confusion between the `KeySelectors` produced
by the `Keys.ExpressionKeys` and the String expressions that we can pass to an
aggregation operator. E.g. one of the distinctions between the two options are
that the former can return a `CompositeType`, while we forbid that to happen in
the case of the latter as that could cause the aggregation itself to fail.
3. The batch API aggregations do not have the overloaded version where you
could pass a field accessor string. Of course this is just a convenience method
anyway, which is easily implemented on the user side, e.g. as it is done in the
`WordCountPojo` example. [2]
As for this pull request I suggest to update the false Javadoc from the
streaming API and document in the concepts that the aggregation field accessors
and the keyselectors are slightly different due to there semantics.
Other than this observation I like the changes and would like to have them
in by the end of next week.
[1]
https://github.com/apache/flink/blob/b8299bf92d8e3dbe140dd89602699394019b783d/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/KeyedStream.java#L295-L310
[2]
https://github.com/apache/flink/blob/b8299bf92d8e3dbe140dd89602699394019b783d/flink-examples/flink-examples-batch/src/main/java/org/apache/flink/examples/java/wordcount/WordCountPojo.java#L106-L111
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---