[
https://issues.apache.org/jira/browse/FLINK-2734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14903602#comment-14903602
]
ASF GitHub Bot commented on FLINK-2734:
---------------------------------------
Github user uce commented on a diff in the pull request:
https://github.com/apache/flink/pull/1166#discussion_r40154386
--- Diff:
flink-staging/flink-streaming/flink-streaming-core/src/main/java/org/apache/flink/streaming/util/keys/KeySelectorUtil.java
---
@@ -152,10 +119,9 @@ public ArrayKeySelector(int... fields) {
@Override
public Tuple getKey(IN value) throws Exception {
- key = (Tuple) tupleClasses[fields.length -
1].newInstance();
+ Tuple key =
Tuple.getTupleClass(fields.length).newInstance();
for (int i = 0; i < fields.length; i++) {
- int pos = fields[i];
--- End diff --
This was the bug... Wow. That's super critical... I am wondering whether
this should be part of 0.10 milestone 1
> ArrayKeySelector returns wrong positions (or fails)
> ---------------------------------------------------
>
> Key: FLINK-2734
> URL: https://issues.apache.org/jira/browse/FLINK-2734
> Project: Flink
> Issue Type: Bug
> Components: Streaming
> Affects Versions: 0.10
> Reporter: Stephan Ewen
> Assignee: Stephan Ewen
> Priority: Critical
> Fix For: 0.10
>
>
> The {{ArrayKeySelector}} is broken and returns wrong values in all cases
> except for [0] as a single only key position.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)