private Optional<StoredProcedure> getProcFromHMS(String name) {
    try {
      StoredProcedureRequest request = new StoredProcedureRequest(
              hplSqlSession.currentCatalog(), hplSqlSession.currentDatabase(), name);
      return Optional.ofNullable(msc.getStoredProcedure(request));
    } catch (NoSuchObjectException e) {
      return Optional.empty();
    } catch (TException e) {
      throw new RuntimeException(e);
    }
  }
Execute a stored procedure using CALL or EXEC statement passing parameters
hplsql/src/main/java/org/apache/hive/hplsql/functions/HmsFunctionRegistry.java