gemini-code-assist[bot] commented on code in PR #36534:
URL: https://github.com/apache/beam/pull/36534#discussion_r2505023005


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/UngroupedWindmillReader.java:
##########
@@ -117,8 +118,14 @@ protected WindowedValue<T> decodeMessage(Windmill.Message 
message) throws IOExce
       Collection<? extends BoundedWindow> windows =
           WindmillSink.decodeMetadataWindows(windowsCoder, 
message.getMetadata());
       PaneInfo paneInfo = 
WindmillSink.decodeMetadataPane(message.getMetadata());
+      boolean drainingValueFromUpstream = false;
       if (WindowedValues.WindowedValueCoder.isMetadataSupported()) {
-        WindmillSink.decodeAdditionalMetadata(windowsCoder, 
message.getMetadata());
+        BeamFnApi.Elements.ElementMetadata elementMetadata =
+            WindmillSink.decodeAdditionalMetadata(windowsCoder, 
message.getMetadata());
+        drainingValueFromUpstream =
+            elementMetadata.hasDrain()
+                ? (elementMetadata.getDrain() == 
BeamFnApi.Elements.DrainMode.Enum.DRAINING)
+                : false;

Review Comment:
   Thank you for the positive feedback!



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