[fix](nereids)fix logical repeat computefd (#47798)
This commit is contained in:
@ -192,17 +192,12 @@ public class LogicalRepeat<CHILD_TYPE extends Plan> extends LogicalUnary<CHILD_T
|
||||
|
||||
@Override
|
||||
public void computeUniform(FunctionalDependencies.Builder fdBuilder) {
|
||||
fdBuilder.addUniformSlot(child(0).getLogicalProperties().getFunctionalDependencies());
|
||||
// don't generate uniform slot
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImmutableSet<FdItem> computeFdItems() {
|
||||
ImmutableSet.Builder<FdItem> builder = ImmutableSet.builder();
|
||||
|
||||
ImmutableSet<FdItem> childItems = child().getLogicalProperties().getFunctionalDependencies().getFdItems();
|
||||
builder.addAll(childItems);
|
||||
|
||||
return builder.build();
|
||||
return ImmutableSet.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -236,13 +236,14 @@ class FunctionalDependenciesTest extends TestWithFeService {
|
||||
Assertions.assertTrue(plan.getLogicalProperties()
|
||||
.getFunctionalDependencies().isUniformAndNotNull(plan.getOutput().get(0)));
|
||||
|
||||
plan = PlanChecker.from(connectContext)
|
||||
.analyze("select id from agg where id = 1 group by cube(id, name)")
|
||||
.rewrite()
|
||||
.getPlan();
|
||||
System.out.println(plan.getLogicalProperties().getFunctionalDependencies());
|
||||
Assertions.assertTrue(plan.getLogicalProperties()
|
||||
.getFunctionalDependencies().isUniform(plan.getOutput().get(0)));
|
||||
// comment this ut since repeat's uniform and fd are disabled in this version
|
||||
//plan = PlanChecker.from(connectContext)
|
||||
// .analyze("select id from agg where id = 1 group by cube(id, name)")
|
||||
// .rewrite()
|
||||
// .getPlan();
|
||||
//System.out.println(plan.getLogicalProperties().getFunctionalDependencies());
|
||||
//Assertions.assertTrue(plan.getLogicalProperties()
|
||||
// .getFunctionalDependencies().isUniform(plan.getOutput().get(0)));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user