liyafan82 commented on a change in pull request #8854:
[FLINK-12959][table-planner-blink] Use BoundedInput and InputSelectable in
blink and implement hash join
URL: https://github.com/apache/flink/pull/8854#discussion_r299346655
##########
File path:
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/join/SortMergeJoinOperator.java
##########
@@ -209,17 +210,21 @@ public void processElement2(StreamRecord<BaseRow>
element) throws Exception {
this.sorter2.write(element.getValue());
}
- public void endInput1() throws Exception {
- isFinished[0] = true;
- if (isAllFinished()) {
- doSortMergeJoin();
- }
- }
-
- public void endInput2() throws Exception {
- isFinished[1] = true;
- if (isAllFinished()) {
- doSortMergeJoin();
+ @Override
+ public void endInput(int inputId) throws Exception {
+ switch (inputId) {
+ case 1:
+ isFinished[0] = true;
+ if (isAllFinished()) {
+ doSortMergeJoin();
+ }
+ break;
+ case 2:
+ isFinished[1] = true;
+ if (isAllFinished()) {
+ doSortMergeJoin();
+ }
+ break;
Review comment:
The code seems duplicated.
Maybe you can replace with
isFinished[inputId] = true;
if (isAllFinished()) {
doSortMergeJoin();
}
----------------------------------------------------------------
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