[Bug] Fix bucket shuffle bug when left table is without any data (#5965)

This commit is contained in:
xinghuayu007
2021-06-16 09:39:31 +08:00
committed by GitHub
parent 8b4721c941
commit daf8ce29ca

View File

@ -837,7 +837,13 @@ public class Coordinator {
int bucketSeq = 0;
int bucketNum = bucketShuffleJoinController.getFragmentBucketNum(destFragment.getFragmentId());
TNetworkAddress dummyServer = new TNetworkAddress("0.0.0.0", 0);
// 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()) {
bucketNum = 1;
destParams.instanceExecParams.get(0).bucketSeqSet.add(0);
}
while (bucketSeq < bucketNum) {
TPlanFragmentDestination dest = new TPlanFragmentDestination();