acrites commented on code in PR #30317:
URL: https://github.com/apache/beam/pull/30317#discussion_r1635176273
##########
sdks/java/harness/src/test/java/org/apache/beam/fn/harness/state/FakeBeamFnStateClient.java:
##########
@@ -97,6 +111,27 @@ public FakeBeamFnStateClient(Map<StateKey, KV<Coder<?>,
List<?>>> initialData, i
}
return chunks;
}));
+
+ List<StateKey> orderedListStateKeys =
+ initialData.keySet().stream()
+ .filter((k) -> k.getTypeCase() == TypeCase.ORDERED_LIST_USER_STATE)
+ .collect(Collectors.toList());
+
+ this.orderedListSortKeysFromStateKey = new HashMap<>();
+ for (StateKey key : orderedListStateKeys) {
+ long sortKey = key.getOrderedListUserState().getRange().getStart();
+
+ StateKey.Builder keyBuilder = key.toBuilder();
+
+ // clear the range in the state key before using it as a key to store,
because ordered list
Review Comment:
I don't understand this comment. Are we trying to handle the case where the
same state key shows up in initialData multiple times?
--
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]