@Test
  public void testUdfInt() throws Throwable {
    String scriptText =
        "DROP TABLE IF EXISTS result;\n" +
            "CREATE TABLE result (col_i int);\n" +
            "INSERT INTO result VALUES(12345);\n" +
            "INSERT INTO result VALUES(54321);\n" +
            "CREATE FUNCTION dbl(i int)\n" +
            "   RETURNS int\n" +
            "BEGIN\n" +
            "   RETURN i * 2;\n" +
            "END;\n" +
            "SELECT dbl(col_i) FROM result;\n";
    testScriptFile(scriptText, args(), "24690.*108642");
  }
Start up a local Hive Server 2 for these tests
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestHplSqlViaBeeLine.java