[fix](fe)fix bug if left table is empty and there are multiple right tables need do bucket shuffle to left side (#19169)

* [fix](fe)fix bug if left table is empty and there are multiple right tables need do bucket shuffle to left side

* fix bug

* fix test cases
This commit is contained in:
starocean999
2023-04-28 15:06:38 +08:00
committed by GitHub
parent 48c4679019
commit f0852f2ac9
2 changed files with 4 additions and 3 deletions

View File

@ -882,7 +882,8 @@ public class StmtRewriter {
}
}
} else {
joinOp = JoinOperator.LEFT_ANTI_JOIN;
joinOp = expr instanceof InPredicate ? JoinOperator.NULL_AWARE_LEFT_ANTI_JOIN
: JoinOperator.LEFT_ANTI_JOIN;
}
}

View File

@ -1357,8 +1357,8 @@ public class Coordinator {
// when left table is empty, it's bucketset is empty.
// set right table destination address to the address of left table
if (destParams.instanceExecParams.size() == 1
&& destParams.instanceExecParams.get(0).bucketSeqSet.isEmpty()) {
if (destParams.instanceExecParams.size() == 1 && (bucketNum == 0
|| destParams.instanceExecParams.get(0).bucketSeqSet.isEmpty())) {
bucketNum = 1;
destParams.instanceExecParams.get(0).bucketSeqSet.add(0);
}