kennknowles commented on code in PR #25940:
URL: https://github.com/apache/beam/pull/25940#discussion_r1146360326


##########
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/StreamingViewOverrides.java:
##########
@@ -63,8 +61,21 @@ private 
StreamingCreatePCollectionView(PCollectionView<ViewT> view) {
 
       @Override
       public PCollection<ElemT> expand(PCollection<ElemT> input) {
-        return input
-            .apply(Combine.globally(new 
Concatenate<ElemT>()).withoutDefaults())
+        PCollection<List<ElemT>> elements;
+        if (view.getViewFn() instanceof PCollectionViews.IsSingletonView) {

Review Comment:
   The view's materialization should be iterable, but the ViewFn itself is 
responsible for converting the iterable to a singleton. In v1 there shouldn't 
actually be a separate materialization concept, and ViewFn is an implementation 
detail, not part of the model. So maybe things are a bit tangled. I'm OK with 
the change here, but ideally we wouldn't introduce another class to the public 
API. Is the new class fully `@Internal`?



-- 
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]

Reply via email to