public synchronized void userAddFunction(Function f, boolean allowExists) throws UserException {
        addFunction(f, false, allowExists);
        GlobalStateMgr.getCurrentState().getEditLog().logAddFunction(f);
    }
@Test
    public void testUserAddFunction() throws UserException {
        // User adds addIntInt UDF
        FunctionName name = new FunctionName(null, "addIntInt");
        name.setAsGlobalFunction();
        final Type[] argTypes = {Type.INT, Type.INT};
        Function f = new Function(name, argTypes, Type.INT, false);
        globalFunctionMgr.userAddFunction(f, false);
        // User adds addDoubleDouble UDF
        FunctionName name2 = new FunctionName(null, "addDoubleDouble");
        name2.setAsGlobalFunction();
        final Type[] argTypes2 = {Type.DOUBLE, Type.DOUBLE};
        Function f2 = new Function(name2, argTypes2, Type.DOUBLE, false);
        globalFunctionMgr.userAddFunction(f2, false);
    }