mihaibudiu commented on code in PR #5137:
URL: https://github.com/apache/calcite/pull/5137#discussion_r3707555301
##########
core/src/main/java/org/apache/calcite/adapter/enumerable/EnumUtils.java:
##########
@@ -1173,21 +1181,26 @@ private void initialize() {
elements.add(inputEnumerator.current());
}
- Map<@Nullable Object, SortedMultiMap<Pair<Long, Long>, @Nullable
Object[]>> sessionKeyMap =
- new HashMap<>();
+ // The windows of each key are kept sorted by start time; the merge
+ // below only compares a window with the one that precedes it.
+ Map<@Nullable Object, NavigableMap<Pair<Long, Long>, List<@Nullable
Object[]>>>
+ sessionKeyMap = new HashMap<>();
Review Comment:
`SortedMultiMap` sorts values (previous implementation), but `NavigableMap`
is a subclass of `SortedMap` which sorts keys. Keys are Pair objects, which are
Comparable.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]