[ 
https://issues.apache.org/jira/browse/FLINK-3702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15490154#comment-15490154
 ] 

ASF GitHub Bot commented on FLINK-3702:
---------------------------------------

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


> DataStream API PojoFieldAccessor doesn't support nested POJOs
> -------------------------------------------------------------
>
>                 Key: FLINK-3702
>                 URL: https://issues.apache.org/jira/browse/FLINK-3702
>             Project: Flink
>          Issue Type: Improvement
>          Components: DataStream API
>    Affects Versions: 1.0.0
>            Reporter: Robert Metzger
>            Assignee: Gabor Gevay
>
> The {{PojoFieldAccessor}} (which is used by {{.sum(String)}} and similar 
> methods) doesn't support nested POJOs right now.
> As part of FLINK-3697 I'll add a check for a nested POJO and fail with an 
> exception.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to