You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/04/07 06:02:45 UTC

[GitHub] [flink] dianfu commented on a change in pull request #11448: [FLINK-16666][python][table] Support new Python dependency configuration options in flink-table.

dianfu commented on a change in pull request #11448: [FLINK-16666][python][table] Support new Python dependency configuration options in flink-table.
URL: https://github.com/apache/flink/pull/11448#discussion_r404546147
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/common/CommonPythonBase.scala
 ##########
 @@ -85,9 +87,18 @@ trait CommonPythonBase {
     }
   }
 
-  protected def getConfig(tableConfig: TableConfig): Configuration = {
-    val config = new Configuration(tableConfig.getConfiguration)
+  protected def getConfig(
+      env: StreamExecutionEnvironment,
+      tableConfig: TableConfig): Configuration = {
+    val clazz = loadClass(CommonPythonBase.PYTHON_DEPENDENCY_UTILS_CLASS)
+    val method = clazz.getDeclaredMethod(
+      "configurePythonDependencies", classOf[StreamExecutionEnvironment], classOf[Configuration])
+    val config = method.invoke(None, env, tableConfig.getConfiguration).asInstanceOf[Configuration]
 
 Review comment:
   None -> null?

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


With regards,
Apache Git Services