HuangXingBo commented on code in PR #20396: URL: https://github.com/apache/flink/pull/20396#discussion_r934341140
########## flink-python/pyflink/fn_execution/embedded/operations.py: ########## @@ -59,17 +66,60 @@ def __init__(self, timer_context, job_parameters) for serialized_fn in serialized_fns]) - super(OneInputFunctionOperation, self).__init__( - operations, input_data_converter, output_data_converter) + super(OneInputFunctionOperation, self).__init__(operations, output_data_converter) + self._input_data_converter = input_data_converter def process_element(self, value): - def _process_element(op, elements): - for element in elements: - yield from op.process_element(element) + results = self._main_operation.process_element( + self._input_data_converter.to_internal(value)) - value = [self._input_data_converter.to_internal(value)] - for operation in self._operations: - value = _process_element(operation, value) + for operation in self._chained_operations: + results = self._process_element(operation, results) Review Comment: Yes. Good catch ########## flink-python/pyflink/fn_execution/embedded/operations.py: ########## @@ -38,8 +38,15 @@ def close(self): def on_timer(self, timestamp): for operation in self._operations: - for item in operation.on_timer(timestamp): - yield self._output_data_converter.to_external(item) + results = operation.on_timer(timestamp) Review Comment: Yes. Good catch. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org