gemini-code-assist[bot] commented on code in PR #37831:
URL: https://github.com/apache/beam/pull/37831#discussion_r2925316518
##########
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/FnApiDoFnRunner.java:
##########
@@ -1947,11 +1937,6 @@ public <T> void outputWindowedValue(
outputTo(consumer, WindowedValues.of(output, timestamp, windows,
paneInfo));
}
- @Override
- public CausedByDrain causedByDrain() {
- return currentElement.causedByDrain();
- }
-
@Override
public CausedByDrain causedByDrain(DoFn<InputT, OutputT> doFn) {
Review Comment:

This override of `causedByDrain(DoFn)` should likely be removed. You have
removed the `causedByDrain()` override in this class, which means calls to it
will now throw an `UnsupportedOperationException` as it will use the base class
implementation from `DoFn.ProcessContext`. However, this `causedByDrain(DoFn)`
override remains, creating an inconsistency. A user calling
`processContext.causedByDrain()` would get an exception, while
`processContext.causedByDrain(doFn)` would succeed.
Given that `causedByDrain` support seems to be moving to
`SplittableProcessBundleContext` exclusively within this runner, it would be
more consistent to remove this override as well, so that both methods either
work or throw, together.
--
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]