@Test
  public void testUdfBigInt() throws Throwable {
    String scriptText =
        "DROP TABLE IF EXISTS result;\n" +
            "CREATE TABLE result (col_b bigint);\n" +
            "INSERT INTO result VALUES(123456789);\n" +
            "INSERT INTO result VALUES(987654321);\n" +
            "CREATE FUNCTION dbl(b bigint)\n" +
            "   RETURNS int8\n" +
            "BEGIN\n" +
            "   RETURN b * 2;\n" +
            "END;\n" +
            "SELECT dbl(col_b) FROM result;\n";
    testScriptFile(scriptText, args(), "246913578.*1975308642");
  }
Start up a local Hive Server 2 for these tests
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestHplSqlViaBeeLine.java