robertwb commented on code in PR #31087:
URL: https://github.com/apache/beam/pull/31087#discussion_r1583387136
##########
sdks/java/core/src/main/java/org/apache/beam/sdk/values/PCollectionViews.java:
##########
@@ -960,6 +995,179 @@ public void verifyDeterministic() throws
NonDeterministicException {
}
}
+ /**
+ * Implementation which is able to adapt an iterable materialization to a
{@code List<T>}.
+ *
+ * <p>Unlike ListViewFn2, this implementation is optimized for iteration
rather than indexing.
+ *
+ * <p>For internal use only.
+ */
+ public static class ListViewFn3<T> extends ViewFn<IterableView<T>, List<T>> {
Review Comment:
Yes, this is equivalent to View.asIterable() plus implementing the List
methods so nothing breaks. Good question about the Window -> Iterable map; this
is handled at a lower level, but I don't know all the details there (though in
that case I can see that constructing the mapping would be more worthwhile). In
the interest of being conservative while capturing the most important gains
I'll restrict this to the global window case.
--
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]