This is an automated email from the ASF dual-hosted git repository. dataroaring pushed a commit to branch branch-3.0 in repository https://gitbox.apache.org/repos/asf/doris.git
commit f15c8e93dce407d504fe087085958c20d1b8c4a0 Author: 谢健 <jianx...@gmail.com> AuthorDate: Mon May 27 11:21:23 2024 +0800 [fix](Nereids): avoid memory usage due to multiple iterations when eliminate func deps (#35408) --- .../src/main/java/org/apache/doris/nereids/properties/FuncDeps.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/FuncDeps.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/FuncDeps.java index 464bbe7b8c8..c77b5ed03b6 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/FuncDeps.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/FuncDeps.java @@ -100,7 +100,11 @@ public class FuncDeps { Set<Set<Slot>> minSlotSet = slots; List<Set<Set<Slot>>> reduceSlotSets = new ArrayList<>(); reduceSlotSets.add(slots); - while (!reduceSlotSets.isEmpty()) { + // To avoid memory usage due to multiple iterations, + // we set a maximum number of loop iterations. + int count = 0; + while (!reduceSlotSets.isEmpty() && count < 100) { + count += 1; List<Set<Set<Slot>>> newReduceSlotSets = new ArrayList<>(); for (Set<Set<Slot>> slotSet : reduceSlotSets) { for (FuncDepsItem funcDepsItem : items) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org