@Test
  public void testHplSqlProcedureWithCOALESCEUdf() throws Throwable {
    String SCRIPT_TEXT =
        "DROP TABLE IF EXISTS result;\n" +
            "CREATE TABLE result (id int, s string);\n" +
            "CREATE PROCEDURE p1(s1 int, s2 string)\n" +
            "BEGIN\n" +
            "INSERT INTO result VALUES(COALESCE(NULL, s1, 2, 3), s2);\n" +
            "END;\n" +
            "p1(786, 'Cloud');\n" +
            "SELECT * FROM result;" ;
    testScriptFile(SCRIPT_TEXT, args(), "786.*Cloud");
  }
Start up a local Hive Server 2 for these tests
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestHplSqlViaBeeLine.java