fsk119 commented on pull request #15558:
URL: https://github.com/apache/flink/pull/15558#issuecomment-834375083


   The current test only tells us we can ADD JAR into the classloader.  But 
does it really means whether we can load the function from the added jars? The 
most convenient way to verify is to use `CliClientITCase` to test `funciton.q`. 
In `CliClientITCase#setup` we mannualy register the jar into the client, I find 
add jar doesn't work for the test.
   
   The ADD JAR has two parts in SQL client actually:
   - add the url to the classloader. When compile the sql to job graph, the 
classloader will find the defination of the reference functions/connectors in 
the resources
   - add the urls to `PipelineOptions#Jars`. The `ExecutionEnvironment` will 
upload the jars to the remote, e.g. `YarnClusterDescriptor#startAppMaster`. 
Therefore, you are responsible to set the jar files into the `Configuratition`. 
 Please refer to `DefaultContext#createExecutionConfig` for more details.
   
   By the way, you should also consider RESET to rollback the added jar files. 
   
   Also I am confused why do you use list as the input of the 
`Executor#addJars`. The API in the doc we only support to add one  jar.
   


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