@Test
  public void testUdfDecimal() throws Throwable {
    String scriptText =
        "DROP TABLE IF EXISTS result;\n" +
            "CREATE TABLE result (col_d decimal(15,2));\n" +
            "INSERT INTO result VALUES(123456789.98);\n" +
            "INSERT INTO result VALUES(987654321.12);\n" +
            "CREATE FUNCTION triple(d decimal(15,2))\n" +
            "   RETURNS decimal(15,2)\n" +
            "BEGIN\n" +
            "   RETURN d * 3;\n" +
            "END;\n" +
            "SELECT triple(col_d) FROM result;\n";
    testScriptFile(scriptText, args(), "370370369.94.*2962962963.36");
  }
Start up a local Hive Server 2 for these tests
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestHplSqlViaBeeLine.java