acrites commented on code in PR #37691:
URL: https://github.com/apache/beam/pull/37691#discussion_r2881216203
##########
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/state/MultimapSideInput.java:
##########
@@ -75,12 +77,13 @@ public MultimapSideInput(
this.keyCoder = keyCoder;
this.valueCoder = valueCoder;
this.useBulkRead = useBulkRead;
+ this.hasNoState = hasNoState;
}
@Override
public Iterable<K> get() {
return StateFetchingIterators.readAllAndDecodeStartingFrom(
Review Comment:
How does batch get its side inputs? We might still need to use the
StateFetchingIterators here? Otherwise, with what you have now, I think `get()`
will just always return an empty Iterable when `hasNoState` is true.
##########
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/state/MultimapUserState.java:
##########
Review Comment:
As an alternative to consider: instead of passing `hasNoState` into the
`StateFetchingIterators` class, what if we just set `this.persistedEntries` to
some kind of "empty" PrefetchableIterator when `hasNoState` is true instead?
--
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]