[ https://issues.apache.org/jira/browse/FLINK-5299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15734216#comment-15734216 ]
Aljoscha Krettek commented on FLINK-5299: ----------------------------------------- A {{KeySelector}} that calls {{Arrays.hashCode(values)}} will not work because the {{KeySelector}} does usually not calculate the hash but just return the key. I think we would need to wrap the array into a special type that has a {{hashCode()}} method that returns the right value so that when Flink calls {{hashCode()}} we get the correct array hash. > DataStream support for arrays as keys > ------------------------------------- > > Key: FLINK-5299 > URL: https://issues.apache.org/jira/browse/FLINK-5299 > Project: Flink > Issue Type: Improvement > Components: DataStream API > Affects Versions: 1.2.0 > Reporter: Chesnay Schepler > Labels: star > > It is currently not possible to use an array as a key in the DataStream api, > as it relies on hashcodes which aren't stable for arrays. > One way to implement this would be to check for the key type and inject a > KeySelector that calls "Arrays.hashcode(values)". -- This message was sent by Atlassian JIRA (v6.3.4#6332)