Skip to content

Commit 4169a8c

Browse files
committed
fix fe ut
1 parent 2bbaea1 commit 4169a8c

File tree

3 files changed

+7
-21
lines changed

3 files changed

+7
-21
lines changed

fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/executor/Optimizer.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@ public static boolean isDpHyp(CascadesContext cascadesContext) {
100100
&& !cascadesContext.isLeadingDisableJoinReorder()
101101
&& continuousJoinNum <= sessionVariable.getMaxJoinNumberOfReorder()
102102
&& isDpHyp;
103-
if (continuousJoinNum > 0) {
104-
finalEnableDpHyp = true;
105-
}
106-
107103
cascadesContext.getStatementContext().setDpHyp(finalEnableDpHyp);
108104
return finalEnableDpHyp;
109105
}

fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/JoinType.java

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import java.util.Map;
2727

2828
/**
29-
* All join type in Nereids.
29+
* All job type in Nereids.
3030
*/
3131
public enum JoinType {
3232
INNER_JOIN,
@@ -55,7 +55,7 @@ public enum JoinType {
5555
.build();
5656

5757
// TODO: the right-semi/right-anti/right-outer join is not derived in paper. We need to derive them
58-
// TODO: add null rejecting conjunct check for assoc, l-assoc and r-assoc
58+
5959
/*ASSOC:
6060
* topJoin bottomJoin
6161
* / \ / \
@@ -69,24 +69,14 @@ public enum JoinType {
6969
*/
7070
private static final Map<JoinType, ImmutableSet<JoinType>> assocJoinMatrix
7171
= ImmutableMap.<JoinType, ImmutableSet<JoinType>>builder()
72-
.put(CROSS_JOIN, ImmutableSet.of(CROSS_JOIN, INNER_JOIN, LEFT_SEMI_JOIN, LEFT_ANTI_JOIN,
73-
LEFT_OUTER_JOIN, FULL_OUTER_JOIN))
74-
.put(INNER_JOIN, ImmutableSet.of(CROSS_JOIN, INNER_JOIN, LEFT_SEMI_JOIN, LEFT_ANTI_JOIN,
75-
LEFT_OUTER_JOIN, FULL_OUTER_JOIN))
72+
.put(CROSS_JOIN, ImmutableSet.of(CROSS_JOIN, INNER_JOIN))
73+
.put(INNER_JOIN, ImmutableSet.of(CROSS_JOIN, INNER_JOIN))
7674
.build();
7775

7876
private static final Map<JoinType, ImmutableSet<JoinType>> lAssocJoinMatrix
7977
= ImmutableMap.<JoinType, ImmutableSet<JoinType>>builder()
80-
.put(CROSS_JOIN, ImmutableSet.of(CROSS_JOIN, INNER_JOIN, LEFT_SEMI_JOIN, LEFT_ANTI_JOIN,
81-
LEFT_OUTER_JOIN))
82-
.put(INNER_JOIN, ImmutableSet.of(CROSS_JOIN, INNER_JOIN, LEFT_SEMI_JOIN, LEFT_ANTI_JOIN,
83-
LEFT_OUTER_JOIN))
84-
.put(LEFT_SEMI_JOIN, ImmutableSet.of(CROSS_JOIN, INNER_JOIN, LEFT_SEMI_JOIN, LEFT_ANTI_JOIN,
85-
LEFT_OUTER_JOIN))
86-
.put(LEFT_ANTI_JOIN, ImmutableSet.of(CROSS_JOIN, INNER_JOIN, LEFT_SEMI_JOIN, LEFT_ANTI_JOIN,
87-
LEFT_OUTER_JOIN))
88-
.put(LEFT_OUTER_JOIN, ImmutableSet.of(CROSS_JOIN, INNER_JOIN, LEFT_SEMI_JOIN, LEFT_ANTI_JOIN,
89-
LEFT_OUTER_JOIN))
78+
.put(CROSS_JOIN, ImmutableSet.of(CROSS_JOIN, INNER_JOIN))
79+
.put(INNER_JOIN, ImmutableSet.of(CROSS_JOIN, INNER_JOIN))
9080
.build();
9181

9282
private static final Map<JoinType, ImmutableSet<JoinType>> rAssocJoinMatrix

fe/fe-core/src/test/java/org/apache/doris/nereids/util/PlanConstructor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public static OlapTable newOlapTable(long tableId, String tableName, int hashCol
107107
// Use two INT columns to increase chance of join matches in randomized tests
108108
List<Column> columns = ImmutableList.of(
109109
new Column("id", Type.INT, true, AggregateType.NONE, "0", ""),
110-
new Column("age", Type.INT, true, AggregateType.NONE, "0", ""));
110+
new Column("name", Type.STRING, true, AggregateType.NONE, "", ""));
111111

112112
HashDistributionInfo hashDistributionInfo = new HashDistributionInfo(3,
113113
ImmutableList.of(columns.get(hashColumn)));

0 commit comments

Comments
 (0)