[fix](nereids) fix dead loop in unnesting subquery rule (#12345)

[fix](nereids) fix dead loop in unnesting subquery rule
This commit is contained in:
zhengshiJ
2022-09-06 11:50:30 +08:00
committed by GitHub
parent cf5d194fe1
commit d7dedfadad

View File

@ -68,6 +68,11 @@ public class ApplyPullFilterOnAgg extends OneRewriteRuleFactory {
List<Expression> correlatedPredicate = split.get(true);
List<Expression> unCorrelatedPredicate = split.get(false);
// the representative has experienced the rule and added the correlated predicate to the apply node
if (correlatedPredicate.isEmpty()) {
return apply;
}
LogicalFilter<GroupPlan> newUnCorrelatedFilter = null;
if (!unCorrelatedPredicate.isEmpty()) {
newUnCorrelatedFilter = new LogicalFilter<>(ExpressionUtils.and(unCorrelatedPredicate),