From 91dd58a857ee03d62dde0b3ad0de6af4db77dd38 Mon Sep 17 00:00:00 2001 From: liuyongvs Date: Fri, 20 Dec 2024 12:13:54 +0800 Subject: [PATCH] [FLINK-34505][table] fix aci --- .../planner/plan/rules/logical/WindowGroupReorderRule.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/rules/logical/WindowGroupReorderRule.java b/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/rules/logical/WindowGroupReorderRule.java index 9fab4d15c07db..b80bcc7c5f693 100644 --- a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/rules/logical/WindowGroupReorderRule.java +++ b/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/rules/logical/WindowGroupReorderRule.java @@ -18,8 +18,6 @@ package org.apache.flink.table.planner.plan.rules.logical; -import org.apache.flink.shaded.guava31.com.google.common.collect.Lists; - import org.apache.calcite.plan.RelOptRuleCall; import org.apache.calcite.plan.RelRule; import org.apache.calcite.rel.RelCollation; @@ -78,7 +76,9 @@ public void onMatch(RelOptRuleCall call) { } }); - if (!sequenceGroups.equals(oldGroups) && !Lists.reverse(sequenceGroups).equals(oldGroups)) { + List reverseSequenceGroups = new ArrayList<>(window.groups); + Collections.reverse(reverseSequenceGroups); + if (!sequenceGroups.equals(oldGroups) && !reverseSequenceGroups.equals(oldGroups)) { int offset = input.getRowType().getFieldCount(); List aggTypeIndexes = new ArrayList<>(); for (Group group : oldGroups) {