zhanglistar commented on code in PR #12327:
URL: https://github.com/apache/gluten/pull/12327#discussion_r3510511471


##########
gluten-flink/runtime/src/main/java/org/apache/gluten/table/runtime/operators/GlutenTwoInputOperator.java:
##########
@@ -234,18 +262,33 @@ public void processWatermark2(Watermark mark) throws 
Exception {
     processElementInternal();
   }
 
+  @Override
+  public void endInput(int inputId) throws Exception {
+    switch (inputId) {
+      case 1:
+        leftInputEnded = true;
+        if (leftInputQueue != null) {
+          leftInputQueue.noMoreInput();
+        }
+        break;
+      case 2:
+        rightInputEnded = true;
+        if (rightInputQueue != null) {
+          rightInputQueue.noMoreInput();
+        }
+        break;
+      default:
+        throw new IllegalArgumentException("Unknown input id: " + inputId);
+    }
+  }
+
   @Override
   public void close() throws Exception {
     closing = true;
     GlutenCloseables.runWithCleanup(
         () -> {
-          if (leftInputQueue != null) {
-            leftInputQueue.close();
-          }
-        },
-        () -> {
-          if (rightInputQueue != null) {
-            rightInputQueue.close();
+          if (task != null) {
+            finishTask();

Review Comment:
   The risk does not exists now.



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

To unsubscribe, e-mail: [email protected]

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to