Skip to content

Commit

Permalink
modify case
Browse files Browse the repository at this point in the history
Signed-off-by: before-Sunrise <[email protected]>
  • Loading branch information
before-Sunrise committed Sep 3, 2024
1 parent c475d99 commit df291d2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
9 changes: 5 additions & 4 deletions fe/fe-core/src/test/java/com/starrocks/sql/plan/JoinTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3282,12 +3282,13 @@ public void testOuterJoinOnConstValue() throws Exception {
" `AGGED_GROUP_FIND_L_TABLE`.`GROUPED_FIND_LITERAL` = `JOINED_AGGED_SEQUENCE_R_TABLE`.`JOINED_LITERAL`\n" +
" );";
String plan = getFragmentPlan(query);
// left outer join can not use const expr replacement optimization because it may generate null values
assertContains(plan, "16:Project\n" +
System.out.println(plan);
//outer join can not use const expr replacement optimization because it may generate null values
assertContains(plan, "10:Project\n" +
" | <slot 29> : 29: expr\n" +
" | \n" +
" 15:NESTLOOP JOIN\n" +
" | join op: LEFT OUTER JOIN\n" +
" 9:NESTLOOP JOIN\n" +
" | join op: RIGHT OUTER JOIN\n" +
" | colocate: false, reason:");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,15 @@ public void testSelectConst() throws Exception {
" 3:UNION\n" +
" constant exprs: \n" +
" NULL");
assertPlanContains("select v1,v2,b from t0 inner join (select 1 as a,2 as b) t on v1 = a", "2:Project\n" +
" | <slot 9> : 1\n" +
assertPlanContains("select v1,v2,b from t0 inner join (select 1 as a,2 as b) t on v1 = a", " 1:Project\n" +
" | <slot 1> : 1: v1\n" +
" | <slot 2> : 2: v2\n" +
" | <slot 7> : 2\n" +
" | \n" +
" 0:OlapScanNode\n" +
" TABLE: t0\n" +
" PREAGGREGATION: ON\n" +
" PREDICATES: 1: v1 = 1, 1: v1 IS NOT NULL");
" PREDICATES: 1: v1 = 1");
}

@Test
Expand Down

0 comments on commit df291d2

Please sign in to comment.