[FLINK-38941][python] Add Python building blocks for async Python scalar function#27438
[FLINK-38941][python] Add Python building blocks for async Python scalar function#27438dianfu wants to merge 4 commits intoapache:masterfrom
Conversation
21307ae to
13766df
Compare
bgeng777
left a comment
There was a problem hiding this comment.
Thanks for the PR. Just some minor comments
| self._output_processor = None | ||
|
|
||
| # Job parameters | ||
| self.job_parameters = {p.key: p.value for p in serialized_fn.job_parameters} |
There was a problem hiding this comment.
why doesn'tjob_parameters field start with '_' as well
|
|
||
| entry = self._queue.put(None, 0, 0, value) | ||
|
|
||
| async def execute_async(result_handler): |
There was a problem hiding this comment.
line 149 directly uses result_handler as a variable name, I believe the codes are right but maybe renaming the input parameter here to a different name can make the codes more readable.
| @@ -671,7 +782,7 @@ def udf(f: Union[Callable, ScalarFunction, Type] = None, | |||
| (default: general) | |||
| :param udf_type: the type of the python function, available value: general, pandas, | |||
There was a problem hiding this comment.
It looks like we do not have :param udf_type any more in the input parameters, we can remove this doc line
| self.assertIn("Test exception in async eval", str(context.exception)) | ||
|
|
||
| def test_async_function_with_retry_logic(self): | ||
| """Test async scalar function with custom retry logic.""" |
There was a problem hiding this comment.
How do we enable retry for this test? I don't find we have set some retry configs here
There was a problem hiding this comment.
I found table.exec.async-scalar.retry-strategy's default value is FIXED_DELAY. I may get this mixed up with datastream api. Ignore the previous comment.
86bf9f5 to
4dcbc36
Compare
What is the purpose of the change
Brief change log
Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (yes)Documentation