DonnyZone commented on a change in pull request #1756: [CALCITE-1824] GROUP_ID returns wrong result URL: https://github.com/apache/calcite/pull/1756#discussion_r366407494
########## File path: core/src/main/java/org/apache/calcite/sql/validate/AggregatingSelectScope.java ########## @@ -108,19 +108,20 @@ private Resolved resolve() { groupExprProjection = groupAnalyzer.groupExprProjection; } - final Set<ImmutableBitSet> flatGroupSets = - Sets.newTreeSet(ImmutableBitSet.COMPARATOR); + final TreeMap<ImmutableBitSet, Integer> flatGroupSetCount = Review comment: For the entries in map, we do not care about whether they are sorted. But the flatten group sets (i.e.,the map's keyset) should be ordered when constructing Resolved. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services