GitHub user xccui opened a pull request: https://github.com/apache/flink/pull/3768
[FLINK-6368][table] Grouping keys in stream aggregations have wrong order âFLINK-5768 removed the `AggregateUtil.createPrepareMapFunction` stage, who maps all grouping keys to the first n fields of a record. That's why in old versions we generated new shifted grouping keys (`val groupingKeys = grouping.indices.toArray`) by the original keys' indices. Now that the mapping has been removed, we should use the original grouping keys rather than the shifted keys. Also, a test method posted in https://issues.apache.org/jira/browse/FLINK-6368 is added to DataStreamAggregateITCase. You can merge this pull request into a Git repository by running: $ git pull https://github.com/xccui/flink FLINK-6368 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3768.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3768 ---- commit ed03570d9bfa52e634de5a13b3425a5fd21fe6c8 Author: xccui <xingc...@gmail.com> Date: 2017-04-25T06:06:45Z [FLINK-6368] Fix the wrong ordered keys problem ---- --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---