@Test
  public void testUdfChar() throws Throwable {
    String scriptText =
        "DROP TABLE IF EXISTS result;\n" +
            "CREATE TABLE result (col_c char(10));\n" +
            "INSERT INTO result VALUES('Daya');\n" +
            "INSERT INTO result VALUES('Alice');\n" +
            "CREATE FUNCTION hello(c char(10))\n" +
            "   RETURNS char(10)\n" +
            "BEGIN\n" +
            "   RETURN 'Hello ' || c || '!';\n" +
            "END;\n" +
            "SELECT hello(col_c) FROM result ORDER BY col_c ASC;\n";
    testScriptFile(scriptText, args(), "Hello Alice!.*Hello Daya!");
  }
Start up a local Hive Server 2 for these tests
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestHplSqlViaBeeLine.java