aljoscha commented on a change in pull request #11702:
URL: https://github.com/apache/flink/pull/11702#discussion_r411323004



##########
File path: 
flink-clients/src/main/java/org/apache/flink/client/cli/ExecutionConfigAccessor.java
##########
@@ -74,6 +74,11 @@ public static ExecutionConfigAccessor 
fromProgramOptions(final ProgramOptions op
 
                
SavepointRestoreSettings.toConfiguration(options.getSavepointRestoreSettings(), 
configuration);
 
+               // If the Python configuration exists, write them to the 
configuration for Python program/UDF execution.
+               if (options instanceof PythonProgramOptions) {

Review comment:
       Instead of the `instanceof` here, I think it's better to add a method to 
`ProgramOptions` for adding additional configuration. Something like 
`(addToConfiguration(Configuration)`. On the base `ProgramOptions` this would 
do nothing but in `PythonProgramOptions` this would add the additional python 
configuration.
   
   If we really want to do it nicely, though, we can even add the current code 
in this method here to the new `ProgramOptions.addToConfiguration()`. This way 
we treat everything the same.




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


Reply via email to