[fix](Nereids): fix bugs in struct info (#27890)

This commit is contained in:
谢健
2023-12-02 15:15:20 +08:00
committed by GitHub
parent 10483ea12c
commit 934f37ee4f
2 changed files with 46 additions and 2 deletions

View File

@ -431,14 +431,13 @@ public class HyperGraph {
private Pair<BitSet, Long> buildStructInfo(Plan plan) {
if (plan instanceof GroupPlan) {
Group group = ((GroupPlan) plan).getGroup();
buildStructInfo(group.getLogicalExpressions().get(0).getPlan());
List<HyperGraph> childGraphs = ((GroupPlan) plan).getGroup().getHyperGraphs();
if (childGraphs.size() != 0) {
int idx = addStructInfoNode(childGraphs);
return Pair.of(new BitSet(), LongBitmap.newBitmap(idx));
}
GroupExpression groupExpression = group.getLogicalExpressions().get(0);
buildStructInfo(groupExpression.getPlan()
return buildStructInfo(groupExpression.getPlan()
.withChildren(
groupExpression.children().stream().map(GroupPlan::new).collect(Collectors.toList())));
}