@Test
  public void testHplSqlProcedureWithCast3Udf() throws Throwable {
    String SCRIPT_TEXT =
        "DROP TABLE IF EXISTS result;\n" +
            "CREATE TABLE result (s1 string, s2 string);\n" +
            "CREATE PROCEDURE p1(s1 STRING, s2 string)\n" +
            "BEGIN\n" +
            "INSERT INTO result VALUES(CAST(TIMESTAMP '2015-03-12 10:58:34.111' AS CHAR(10)), s2);\n" +
            "END;\n" +
            "p1('Hive', 'Cloud');\n" +
            "SELECT * FROM result;" ;
    testScriptFile(SCRIPT_TEXT, args(), "2015-03-12.*Cloud");
  }
Start up a local Hive Server 2 for these tests
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestHplSqlViaBeeLine.java