TCatalogObjectFromObjectName in catalog-util.cc doesn't set a couple of important fields properly. Neither arg_types nor ret_type are set. Calling TCatalogObjectFromObjectName() for a function appears to always throw an NPE in Java:
This is because ret_type is not properly set. It doesn't need to be set to the real ret-type for the purpose of looking up the function, but does need to be well formed.
Fixing that leads to the following error:
Note arg_types: - this is because they're not set, but Db.getFunction() ultimately relies on them being set to compare the functions.
It's easy to repro - hit this URL on an Impalad:
You can also see lots of these errors if you run impala-py.test test_udfs.py -k native in the Impalad logs. They don't seem to inhibit correct execution; DROP statements seem to work, but it still seems very buggy.