dianfu commented on a change in pull request #9865: [FLINK-14212][python] 
Support no-argument Python UDFs.
URL: https://github.com/apache/flink/pull/9865#discussion_r333357377
 
 

 ##########
 File path: flink-python/pyflink/table/tests/test_udf.py
 ##########
 @@ -204,6 +204,28 @@ def eval(self, col):
             self.t_env.register_function(
                 "non-callable-udf", udf(Plus(), DataTypes.BIGINT(), 
DataTypes.BIGINT()))
 
+    def test_udf_without_arguments(self):
+        @udf(input_types=[], result_type=DataTypes.BIGINT(), 
deterministic=True)
 
 Review comment:
   1. If there is no arguments, is it possible not declare input_types?
   2. What about using lambda expression instead? Then just one line for each 
udf

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to