I understand that you want to know if you can call an UDF without using a fully-qualified name as we do with built-in functions. Please let me know if I am wrong.
Lets consider a UDF - UPPER.java which is defined under the package myUDF. The function name remains the same as class name i.e. UPPER. Now lets go to the explaination.
Pig resolves function calls by treating the function's name as a Java classname and attempting it to load a class of that name. When searching for classes, Pig uses a classloader that includes the JAR files that have been registered. When running in dis-tributed mode, Pig will ensure that your JAR files get shipped to the cluster.
For the UDF in this example, Pig looks for a class with the name myUDF.UPPER, which it finds in the JAR file we registered.
Resolution of built-in functions proceeds in the same way, except for one difference: Pig has a set of built-in packages names that it searches, so the function call does not have to be fully qualified name. For example, the function MAX is actually implemented by a cass MAX in the package org.apache.pig.builtin. This is one of the packages that pig looks in, so we can write MAX rather than org.apache.pig.builtin.MAX in our pig programs.
We cant register our package with Pig, but we can shorten the function name by de-fining an alias, using the DEFINE operator.
grunt> DEFINE upper myUDF.UPPER
grunt> FOREACH A GENERATE upper(row);
Defining alias is a good idea if you want to use the function several times in the same script.
I hope this helps and clarifies your doubt. I will wait for your response. Please let me know if you need any further help.