Skip to content

Commit d2c9c8b

Browse files
zhongjian.xzjzhongjian.xzj
zhongjian.xzj
authored and
zhongjian.xzj
committed
[nereids] fix join fd computing bug
1 parent ea1955d commit d2c9c8b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/EliminateJoinByFkTest.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ void testNullWithPredicate() throws Exception {
107107

108108
@Test
109109
void testMultiJoin() throws Exception {
110-
addConstraint("Alter table foreign_null add constraint uk unique (id3)\n");
110+
addConstraint("Alter table foreign_null add constraint uk_id3 unique (id3)\n");
111+
addConstraint("Alter table foreign_not_null add constraint uk_id2 unique (id2)\n");
111112
String sql = "select id1 from "
112113
+ "foreign_null inner join foreign_not_null on id2 = id3\n"
113114
+ "inner join pri on id1 = id3";
@@ -116,6 +117,7 @@ void testMultiJoin() throws Exception {
116117
.rewrite()
117118
.nonMatch(logicalOlapScan().when(scan -> scan.getTable().getName().equals("pri")))
118119
.printlnTree();
119-
dropConstraint("Alter table foreign_null drop constraint uk\n");
120+
dropConstraint("Alter table foreign_null drop constraint uk_id3\n");
121+
dropConstraint("Alter table foreign_not_null drop constraint uk_id2");
120122
}
121123
}

0 commit comments

Comments
 (0)