mosche commented on code in PR #24009:
URL: https://github.com/apache/beam/pull/24009#discussion_r1026213378


##########
runners/spark/3/src/main/java/org/apache/beam/runners/spark/structuredstreaming/translation/batch/ParDoTranslatorBatch.java:
##########
@@ -220,8 +225,9 @@ private SideInputBroadcast createBroadcastSideInputs(
       Coder<WindowedValue<?>> windowedValueCoder =
           (Coder<WindowedValue<?>>)
               (Coder<?>) WindowedValue.getFullCoder(pc.getCoder(), 
windowCoder);
-      Dataset<WindowedValue<?>> broadcastSet = 
context.getSideInputDataset(sideInput);
-      List<WindowedValue<?>> valuesList = broadcastSet.collectAsList();
+      Dataset<WindowedValue<?>> broadcastSet = 
context.getDataset((PCollection) pc);
+      List<WindowedValue<?>> valuesList =

Review Comment:
   This is primarily to log the evaluation / collect of the dataset. This can 
be surprising as it's happening a head of time during "translation time".



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