@Test
  public void testUdfDate() throws Throwable {
    String scriptText =
        "DROP TABLE IF EXISTS result;\n" +
            "CREATE TABLE result (col_d date);\n" +
            "INSERT INTO result VALUES('2022-11-24');\n" +
            "INSERT INTO result VALUES('2022-12-25');\n" +
            "CREATE FUNCTION date_today(d date)\n" +
            "   RETURNS date\n" +
            "BEGIN\n" +
            "   RETURN d;\n" +
            "END;\n" +
            "SELECT date_today(col_d) FROM result;\n";
    testScriptFile(scriptText, args(), "2022-11-24.*2022-12-25");
  }
Start up a local Hive Server 2 for these tests
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestHplSqlViaBeeLine.java