kennknowles commented on code in PR #25940:
URL: https://github.com/apache/beam/pull/25940#discussion_r1149944264
##########
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/StreamingViewOverrides.java:
##########
@@ -63,8 +66,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) {
+ elements =
+ input.apply(
+ ParDo.of(
+ new DoFn<ElemT, List<ElemT>>() {
+ @DoFn.ProcessElement
+ public void process(@Element ElemT elemT,
OutputReceiver<List<ElemT>> o) {
+ o.output(ImmutableList.of(elemT));
Review Comment:
I think this will now fail `testNonSingletonSideInput` at
https://github.com/apache/beam/blob/f50c8d503afd50f30122a9e2b839c3d7ad57b642/sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/ViewTest.java#L234
Perhaps pull in https://github.com/apache/beam/pull/25976 and even add a few
more tests for the corner cases.
--
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]