Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-7629

Scala stream aggregations should support nested field expressions

    XMLWordPrintableJSON

    Details

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              ggevay Gabor Gevay
              Reporter:
              ggevay Gabor Gevay
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 10m
                10m