private boolean execUserSql(HplsqlParser.Expr_func_paramsContext ctx, String name) throws TException {
    if (!functions.exists(name)) {
      return false;
    }
    StringBuilder sql = new StringBuilder();
    sql.append("hplsql('");
    sql.append(name);
    sql.append("(");
    int cnt = ctx.func_param().size();
    for (int i = 0; i < cnt; i++) {
      sql.append(":").append(i + 1);
      if (i + 1 < cnt) {
        sql.append(", ");
      }
    }
    sql.append(")'");
    if (cnt > 0) {
      sql.append(", ");
    }
    for (int i = 0; i < cnt; i++) {
      sql.append(evalPop(ctx.func_param(i).expr()));
      if (i + 1 < cnt) {
        sql.append(", ");
      }
    }
    sql.append(", \"");
    sql.append(getStoredProcedure(name.toUpperCase()));
    sql.append("\")");
    Var var = new Var(Type.HPL_SQL_UDF, sql);
    exec.stackPush(var);
    exec.registerUdf();
    return true;
  }
Execute a HPL/SQL user-defined function in a query.
For example converts: select fn(col) from table to select hplsql('fn(:1)', col) from table
hplsql/src/main/java/org/apache/hive/hplsql/Exec.java