dianfu commented on a change in pull request #15790:
URL: https://github.com/apache/flink/pull/15790#discussion_r621750740



##########
File path: docs/content/docs/dev/python/table/udfs/python_udfs.md
##########
@@ -30,6 +30,10 @@ User-defined functions are important features, because they 
significantly extend
 
 **NOTE:** Python UDF execution requires Python version (3.6, 3.7 or 3.8) with 
PyFlink installed. It's required on both the client side and the cluster side. 
 
+## Bundling UDFs

Review comment:
       What about move to the end of this file?

##########
File path: docs/content/docs/dev/python/table/udfs/python_udfs.md
##########
@@ -30,6 +30,10 @@ User-defined functions are important features, because they 
significantly extend
 
 **NOTE:** Python UDF execution requires Python version (3.6, 3.7 or 3.8) with 
PyFlink installed. It's required on both the client side and the cluster side. 
 
+## Bundling UDFs
+
+**NOTE:** To run Python UDFs (as well as Pandas UDF) in any non-local mode, it 
is strongly recommended to bundle your UDF definitions using the config option 
[`python-files`]({{< ref "docs/dev/python/python_config" >}}#python-files), if 
your UDFs live outside of the file where the `main()` function is defined. 
Otherwise, you may run into `ModuleNotFoundError: No module named 'my_udf'` if 
you define UDFs in a file called `my_udf.py`.

Review comment:
       ```suggestion
   To run Python UDFs (as well as Pandas UDFs) in any non-local mode, it is 
strongly recommended to bundle your Python UDF definitions using the config 
option [`python-files`]({{< ref "docs/dev/python/python_config" 
>}}#python-files), if your Python UDFs live outside of the file where the 
`main()` function is defined. Otherwise, you may run into `ModuleNotFoundError: 
No module named 'my_udf'` if you define Python UDFs in a file called 
`my_udf.py`.
   ```




-- 
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:
us...@infra.apache.org


Reply via email to