Copilot commented on code in PR #11477:
URL:
https://github.com/apache/incubator-gluten/pull/11477#discussion_r2726563817
##########
gluten-flink/runtime/src/main/java/org/apache/gluten/table/runtime/operators/GlutenOneInputOperator.java:
##########
@@ -191,6 +191,25 @@ private void processElementInternal() {
}
}
+ @Override
+ public void processWatermark(Watermark mark) throws Exception {
+ task.notifyWatermark(mark.getTimestamp());
+ // Need to process the element internal to ensure the watermark is
processed.
+ processElementInternal();
+ }
+
+ @Override
+ public void processWatermark1(Watermark mark) throws Exception {
+ task.notifyWatermark(mark.getTimestamp(), 0);
+ processElementInternal();
+ }
+
+ @Override
+ public void processWatermark2(Watermark mark) throws Exception {
+ task.notifyWatermark(mark.getTimestamp(), 1);
+ processElementInternal();
+ }
+
@Override
Review Comment:
The GlutenOneInputOperator has processWatermark1 and processWatermark2
methods, but as a one-input operator, it should only handle a single input
stream. These methods appear to be designed for two-input operators and may be
unused or inappropriate for a single-input context. Consider removing these
methods or clarifying their purpose if they serve a specific use case.
```suggestion
```
##########
gluten-flink/runtime/src/main/java/org/apache/gluten/table/runtime/operators/GlutenOneInputOperator.java:
##########
@@ -191,6 +191,25 @@ private void processElementInternal() {
}
}
+ @Override
+ public void processWatermark(Watermark mark) throws Exception {
+ task.notifyWatermark(mark.getTimestamp());
+ // Need to process the element internal to ensure the watermark is
processed.
Review Comment:
The comment 'Need to process the element internal' is unclear. Consider
rephrasing to explain why processElementInternal() is called after notifying
the watermark, such as 'Process any pending elements to ensure
watermark-triggered operations complete'.
```suggestion
// Process any pending elements to ensure watermark-triggered operations
complete.
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]