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


##########
runners/flink/src/test/java/org/apache/beam/runners/flink/streaming/StreamSources.java:
##########
@@ -50,5 +51,11 @@ public static <OutT, SrcT extends SourceFunction<OutT>> void 
run(
   public interface OutputWrapper<T> extends Output<T> {
     @Override
     default void emitWatermarkStatus(WatermarkStatus watermarkStatus) {}
+
+    /** In Flink 1.19 the {@code recordAttributes} method was added. */
+    @Override
+    default void emitRecordAttributes(RecordAttributes recordAttributes) {
+      throw new UnsupportedOperationException("emitRecordAttributes not 
implemented");
+    }

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   Throwing `UnsupportedOperationException` in `emitRecordAttributes` can cause 
unexpected test failures if Flink's runtime decides to emit record attributes 
(e.g., for metadata, latency tracking, or custom attributes) during stream 
execution. It is safer to implement this as a no-op (empty method), similar to 
`emitWatermarkStatus`.
   
   ```java
       /** In Flink 1.19 the {@code recordAttributes} method was added. */
       @Override
       default void emitRecordAttributes(RecordAttributes recordAttributes) {}
   ```



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