WeiZhong94 commented on a change in pull request #10017: [FLINK-14019][python] 
add support for managing environment and dependencies of Python UDF in Flink 
Python API
URL: https://github.com/apache/flink/pull/10017#discussion_r350519298
 
 

 ##########
 File path: 
flink-python/src/main/java/org/apache/flink/table/runtime/operators/python/AbstractPythonScalarFunctionOperator.java
 ##########
 @@ -145,13 +148,21 @@ public void processElement(StreamRecord<IN> element) 
throws Exception {
        }
 
        @Override
-       public PythonFunctionRunner<IN> createPythonFunctionRunner() {
+       public PythonEnv getPythonEnv() {
+               return scalarFunctions[0].getPythonFunction().getPythonEnv();
+       }
+
+       @Override
+       public PythonFunctionRunner<IN> createPythonFunctionRunner() throws 
IOException {
 
 Review comment:
   The PythonDependencyInfo#create still throws IOException so we can not 
remove it currently.

----------------------------------------------------------------
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