@Test
  public void testHplSqlProcedureWithSYSDATEUdf() throws Throwable {
    String SCRIPT_TEXT =
        "DROP TABLE IF EXISTS result;\n" +
            "CREATE TABLE result (name String, join_date timestamp);\n" +
            "CREATE PROCEDURE p1(s1 string)\n" +
            "BEGIN\n" +
            "INSERT INTO result VALUES(s1, SYSDATE);\n" +
            "END;\n" +
            "p1('Bob');\n" +
            "SELECT * FROM result;" ;
    Timestamp today = new Timestamp(System.currentTimeMillis());
    String timestamp = today.toString();
    testScriptFile(SCRIPT_TEXT, args(), "Bob.*" + timestamp.substring(0, timestamp.length() - 9));
  }
Start up a local Hive Server 2 for these tests
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestHplSqlViaBeeLine.java