@Test
  public void testHplSqlProcedureWithReplaceUdf() throws Throwable {
    String SCRIPT_TEXT =
        "DROP TABLE IF EXISTS result;\n" +
            "CREATE TABLE result (name String);\n" +
            "CREATE PROCEDURE p1(s1 string)\n" +
            "BEGIN\n" +
            "INSERT INTO result VALUES(replace(s1, '-', ''));\n" +
            "END;\n" +
            "p1('2024-02-29');\n" +
            "SELECT * FROM result;" ;
    testScriptFile(SCRIPT_TEXT, args(), "20240229");
  }
Start up a local Hive Server 2 for these tests
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestHplSqlViaBeeLine.java