bgeng777 commented on code in PR #27184:
URL: https://github.com/apache/flink/pull/27184#discussion_r2489289225
##########
flink-python/pyflink/fn_execution/datastream/process/async_function/operation.py:
##########
Review Comment:
As we get rid of 'result_future' in the `AsyncFunction`, we may change the
error description here as well when users return non-iterable result
##########
flink-python/pyflink/datastream/tests/test_async_function.py:
##########
@@ -54,12 +54,12 @@ def test_unordered_mode(self):
class MyAsyncFunction(AsyncFunction):
- async def async_invoke(self, value: Row, result_future:
ResultFuture[int]):
+ async def async_invoke(self, value: Row):
await asyncio.sleep(2)
- result_future.complete([value[0] + value[1]])
+ return [value[0] + value[1]]
Review Comment:
I modify the test a little to `return None` and I find that the test can run
without throwing `The 'result_future' of AsyncFunction should be completed with
...` exception.
Is that expected?
--
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]