pnowojski commented on a change in pull request #11177: [FLINK-16219][runtime] 
Made AsyncWaitOperator chainable to non-sources.
URL: https://github.com/apache/flink/pull/11177#discussion_r383135416
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java
 ##########
 @@ -602,9 +602,8 @@ public static boolean isChainable(StreamEdge edge, 
StreamGraph streamGraph) {
                                && outOperator != null
                                && headOperator != null
                                && 
upStreamVertex.isSameSlotSharingGroup(downStreamVertex)
-                               && outOperator.getChainingStrategy() == 
ChainingStrategy.ALWAYS
-                               && (headOperator.getChainingStrategy() == 
ChainingStrategy.HEAD ||
-                                       headOperator.getChainingStrategy() == 
ChainingStrategy.ALWAYS)
+                               && 
outOperator.getChainingStrategy().canBeChainedTo(headOperator)
+                               && headOperator.getChainingStrategy() != 
ChainingStrategy.NEVER
 
 Review comment:
   Why can not we move `headOperator.getChainingStrategy() != 
ChainingStrategy.NEVER` into the `canBeChainedTo(headOperator)` call/check?

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