I have a custom UDF that I have created on several databases in Hive by using the following command through beeline.
add JAR hdfs:///my/jar/location/myjar.jar;
create function my_schema.myFunction as 'com.class.path.hive.MyFunction' using JAR 'hdfs:////my/jar/location/myjar.jar';
However, if a user then tries to use this UDF on any of the schemas I have created it on, it sometimes does not work and they receive a 'Invalid Function' error. However, it does work on some schemas, and then automatically adds the JAR to the classpath. After it works, they can then go back to the schema that it previously did not work on and use it without any issues. Why is this JAR only being added to the classpath sometimes?