Skip to content

Commit

Permalink
[fix](nereids) fix bug of LogicalRepeat computing uniform datatrait (#…
Browse files Browse the repository at this point in the history
…46352)

### What problem does this PR solve?

Related PR: #43391

Problem Summary:
repeat's uniform is not right, remove it temprarily
  • Loading branch information
feiniaofeiafei authored Jan 8, 2025
1 parent 630b0ff commit 6de9d27
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ public void computeUnique(DataTrait.Builder builder) {

@Override
public void computeUniform(DataTrait.Builder builder) {
builder.addUniformSlot(child(0).getLogicalProperties().getTrait());
// don't generate uniform slot
// TODO: this need be supported later
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,7 @@ void testAgg() {
.rewrite()
.getPlan();
System.out.println(plan.getLogicalProperties().getTrait());
Assertions.assertTrue(plan.getLogicalProperties()
.getTrait().isUniform(plan.getOutput().get(0)));
// Assertions.assertTrue(plan.getLogicalProperties().getTrait().isUniform(plan.getOutput().get(0)));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,3 +267,13 @@ cherry 3

-- !right_anti_right_side --

-- !grouping --
\N \N
\N 1
\N 2
\N 3
1 \N
1 1
1 2
1 3

Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,7 @@ suite("eliminate_group_by_key_by_uniform") {
qt_left_anti_left_side "select t1.b from test1 t1 left anti join (select * from test2 where b=105) t2 on t1.a=t2.a where t1.b=1 group by t1.b,t1.a order by 1;"
qt_right_semi_right_side "select t2.b from test1 t1 right semi join (select * from test2 where b=105) t2 on t1.a=t2.a group by t2.b,t2.a order by 1;"
qt_right_anti_right_side "select t2.b from test1 t1 right anti join (select * from test2 where b=105) t2 on t1.a=t2.a group by t2.b,t2.a order by 1;"

//grouping
qt_grouping "select k, k3 from (select 1 as k, a k3, sum(b) as sum_k1 from test1 group by cube(k,a)) t group by k,k3 order by 1,2"
}

0 comments on commit 6de9d27

Please sign in to comment.