@Test
  public void testBlackListedUdfUsage() throws Exception {
    HiveConf conf = new HiveConfForTest(getClass());
    conf.setVar(ConfVars.HIVE_SERVER2_BUILTIN_UDF_BLACKLIST, "sqrt");
    startHS2(conf);

    // create tables as user1
    Connection hs2Conn = DriverManager.getConnection(miniHS2.getJdbcURL(), "user1", "bar");

    Statement stmt = hs2Conn.createStatement();
    String tableName1 = "test_jdbc_sql_auth_udf_blacklist";
    stmt.execute("create table " + tableName1 + "(i int) ");

    verifyUDFNotAllowed(stmt, tableName1, "sqrt(1)", "sqrt");

    // verify udf reflect is allowed (no exception will be thrown)
    stmt.execute("SELECT reflect('java.lang.String', 'valueOf', 1) from " + tableName1);
    stmt.close();
    hs2Conn.close();
  }
Test SQL standard authorization with jdbc/hiveserver2. Specifically udf blacklist behavior.
This test needs to start minihs2 with specific configuration, so it is in a different
test file from {@link TestJdbcWithSQLAuthorization}
itests/hive-unit/src/test/java/org/apache/hive/jdbc/authorization/TestJdbcWithSQLAuthUDFBlacklist.java