This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new ce57b99ce7 [fix](Nereids) colocate join could not work well on full
outer join (#24700)
ce57b99ce7 is described below
commit ce57b99ce74dc3532304c5376a5d248b77bea7e9
Author: morrySnow <[email protected]>
AuthorDate: Thu Sep 21 15:26:59 2023 +0800
[fix](Nereids) colocate join could not work well on full outer join (#24700)
in previous PR #22979, we fix the output deriver of join. But we forgot
to change the util method JoinUtils#shouldColocateJoin to adjust the
change of physical properties derive.
we could not use join distribution type anymore since join could output
any distribute for full outer join.
---
.../main/java/org/apache/doris/nereids/util/JoinUtils.java | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/util/JoinUtils.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/util/JoinUtils.java
index a60fe59f12..dc969418ce 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/util/JoinUtils.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/util/JoinUtils.java
@@ -228,21 +228,14 @@ public class JoinUtils {
||
ConnectContext.get().getSessionVariable().isDisableColocatePlan()) {
return false;
}
- // TODO: not rely on physical properties?
- DistributionSpec joinDistributionSpec =
join.getPhysicalProperties().getDistributionSpec();
DistributionSpec leftDistributionSpec =
join.left().getPhysicalProperties().getDistributionSpec();
DistributionSpec rightDistributionSpec =
join.right().getPhysicalProperties().getDistributionSpec();
if (!(leftDistributionSpec instanceof DistributionSpecHash)
- || !(rightDistributionSpec instanceof DistributionSpecHash)
- || !(joinDistributionSpec instanceof DistributionSpecHash)) {
+ || !(rightDistributionSpec instanceof DistributionSpecHash)) {
return false;
}
- DistributionSpecHash leftHash = (DistributionSpecHash)
leftDistributionSpec;
- DistributionSpecHash rightHash = (DistributionSpecHash)
rightDistributionSpec;
- DistributionSpecHash joinHash = (DistributionSpecHash)
joinDistributionSpec;
- return leftHash.getShuffleType() == ShuffleType.NATURAL
- && rightHash.getShuffleType() == ShuffleType.NATURAL
- && joinHash.getShuffleType() == ShuffleType.NATURAL;
+ return couldColocateJoin((DistributionSpecHash) leftDistributionSpec,
+ (DistributionSpecHash) rightDistributionSpec);
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]