[
https://issues.apache.org/jira/browse/FLINK-7629?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aljoscha Krettek closed FLINK-7629.
-----------------------------------
Fix Version/s: 1.10.0
Resolution: Fixed
Fixed in 13603a9bad90997e25302a4b47028e9686301d8a
> Scala stream aggregations should support nested field expressions
> -----------------------------------------------------------------
>
> Key: FLINK-7629
> URL: https://issues.apache.org/jira/browse/FLINK-7629
> Project: Flink
> Issue Type: Bug
> Components: API / Scala
> Reporter: Gabor Gevay
> Assignee: Gabor Gevay
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.10.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> In the Scala API, {{KeyedStream.maxBy}} and similar methods currently only
> work with a field name, and not with nested field expressions, such as
> "fieldA.fieldX". (Their documentation says this should work.)
> The reason for this is that the string overload of {{KeyedStream.aggregate}}
> uses {{fieldNames2Indices}} and then calls the integer overload. Instead, it
> should create a {{SumAggregator}} or {{ComparableAggregator}} directly, as
> the integer overload does (and as the Java API does). The ctors of
> {{SumAggregator}} or {{ComparableAggregator}} will call
> {{FieldAccessorFactory.getAccessor}}, which will correctly handle a nested
> field expression.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)