acrites commented on code in PR #37691:
URL: https://github.com/apache/beam/pull/37691#discussion_r2933910058
##########
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/state/StateFetchingIterators.java:
##########
@@ -94,6 +94,20 @@ public static <T> CachingStateIterable<T>
readAllAndDecodeStartingFrom(
valueCoder);
}
+ public static <T> CachingStateIterable<T> emptyCachingStateIterable(
Review Comment:
This could probably use some testing. My concern is that, because we're
using a noop cache, if we ever decide to check if such an iterable is empty,
it'll do that by trying to read the first page of the iterable, which will then
try to send a request across the FnApi (which shouldn't ever be needed). We
might need to instead make some sort of subclass that always returns an empty
iterator from its GetIterator method. At the very least, we shouldn't need to
pass in a `BeamFnStateClient`, `StateRequest`, or even valueCoder I guess to
such a thing.
--
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]