pnowojski commented on a change in pull request #12575:
URL: https://github.com/apache/flink/pull/12575#discussion_r440748481



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/UnionInputGate.java
##########
@@ -105,11 +105,11 @@ public UnionInputGate(IndexedInputGate... inputGates) {
                inputChannelToInputGateIndex = new 
int[totalNumberOfInputChannels];
 
                int currentNumberOfInputChannels = 0;
-               for (final IndexedInputGate inputGate : inputGates) {
-                       inputGateChannelIndexOffsets[inputGate.getGateIndex()] 
= currentNumberOfInputChannels;
+               for (int index = 0; index < inputGates.length; index++) {

Review comment:
       Ok, let's try out the `Map` approach. In case of performance issues, we 
can later fallback to other solution, like sparse index.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to