docs: public static synchronized int registerTokenForUDF(String functionName,
                                                         int functionId,
                                                         VoltType voltReturnType,
                                                         VoltType[] voltParameterTypes) {
          int retFunctionId;
          Type hsqlReturnType = hsqlTypeFromVoltType(voltReturnType);
          Type[] hsqlParameterTypes = hsqlTypeFromVoltType(voltParameterTypes);
          // If the token is already registered in the map, do not bother again.
          FunctionDescriptor oldFd = findFunction(functionName, hsqlReturnType, hsqlParameterTypes);
          if (oldFd != null) {
              // This may replace functionName with itself. This will not be an error.
              FunctionDescriptor.addDefinedFunction(functionName, oldFd);
              retFunctionId = oldFd.getId();
              // If we were given a non-negative function id, it
              // was defined in the catalog.  Our re-verification here
              // should have a value which we put into the catalog sometime
              // earlier.  So, this earlier value should match the one we
              // were told to return.
              assert((functionId < 0) || (functionId == retFunctionId));
          } else {
              // if the function was not already defined, then
              //   if functionId is a valid UDF id or pre-defined SQL function id, then use it
              //   otherwise, we want a new number.
              //
              if (functionId > 0) {
                  retFunctionId = functionId;
              } else {
                  retFunctionId = getNextFunctionId();
              }
              FunctionDescriptor fd = makeFunctionDescriptorFromParts(functionName, retFunctionId,
                                                              hsqlReturnType, hsqlParameterTypes);
              // if the function id belongs to UDF, put it into the defined_function map
              if (isUserDefinedFunctionId(retFunctionId)) {
                  FunctionDescriptor.addDefinedFunction(functionName, fd);
              }
              m_logger.debug(String.format("Added UDF \"%s\"(%d) with %d parameters",
                                          functionName, retFunctionId, voltParameterTypes.length));
          }
          // Ensure that m_udfSeqId is larger than all the
          // ones we've seen so far.
          if (m_udfSeqId <= retFunctionId) {
              m_udfSeqId = retFunctionId + 1;
          }
          return retFunctionId;
      }