Skip to content

Commit 44cfdfd

Browse files
committed
Ensure fixed iteration order of GroupId assignments
1 parent 1204ac7 commit 44cfdfd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/trino-main/src/main/java/io/trino/sql/planner/optimizations/SymbolMapper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@
5858
import io.trino.sql.planner.rowpattern.ValuePointer;
5959
import io.trino.sql.planner.rowpattern.ir.IrLabel;
6060

61-
import java.util.HashMap;
6261
import java.util.HashSet;
62+
import java.util.LinkedHashMap;
6363
import java.util.LinkedHashSet;
6464
import java.util.List;
6565
import java.util.Map;
@@ -216,7 +216,7 @@ public Aggregation map(Aggregation aggregation)
216216

217217
public GroupIdNode map(GroupIdNode node, PlanNode source)
218218
{
219-
Map<Symbol, Symbol> newGroupingMappings = new HashMap<>();
219+
Map<Symbol, Symbol> newGroupingMappings = new LinkedHashMap<>();
220220
ImmutableList.Builder<List<Symbol>> newGroupingSets = ImmutableList.builder();
221221

222222
for (List<Symbol> groupingSet : node.getGroupingSets()) {

0 commit comments

Comments
 (0)