AHeise commented on a change in pull request #11529: [FLINK-16806][operators] 
Add support for InputSelection to MultipleInputStreamOperator
URL: https://github.com/apache/flink/pull/11529#discussion_r398665720
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/MultipleInputSelectionHandler.java
 ##########
 @@ -112,7 +112,7 @@ int selectNextInputIndex(int lastReadInputIndex) {
        }
 
        boolean shouldSetAvailableForAnotherInput() {
-               return availableInputsMask != allSelectedMask && 
inputSelection.areAllInputsSelected();
+               return (inputSelection.getInputMask() & allSelectedMask & 
~availableInputsMask) != 0;
 
 Review comment:
   Could we avoid 1 `& allSelectedMask` here? It feels like it should only be 
relevant for `ALL`. We could then eagerly apply `allSelectedMask` instead of 
setting ALL (`new InputSelection(-1 & allSelectedMask)`).

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to