Copilot commented on code in PR #4415:
URL: https://github.com/apache/texera/pull/4415#discussion_r3107776374
##########
amber/src/main/python/core/models/operator.py:
##########
@@ -108,14 +108,12 @@ def close(self) -> None:
def process_state(self, state: State, port: int) -> Optional[State]:
"""
Process an input State from the given link.
- The default implementation is to pass the State to all downstream
operators
- if the State has pass_to_all_downstream set to True.
+ The default implementation is to pass the State to all downstream
operators.
:param state: State, a State from an input port to be processed.
:param port: int, input port index of the current exhausted port.
:return: State, producing one State object
Review Comment:
The `process_state` docstring return description is now misleading: the
method is annotated as `Optional[State]`, and per the engine semantics
returning `None` should consume the state (stop propagation). Update the
`:return:` line(s) to reflect that `None` is a valid return and what it means.
```suggestion
:return: Optional[State], returning a State to continue propagation,
or None
to consume the State and stop propagation.
```
--
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]