@Test
  public void testUdfDouble() throws Throwable {
    String scriptText =
        "DROP TABLE IF EXISTS result;\n" +
            "CREATE TABLE result (col_d double);\n" +
            "INSERT INTO result VALUES(123456789.12);\n" +
            "INSERT INTO result VALUES(987654321.98);\n" +
            "CREATE FUNCTION dbl(d float)\n" +
            "   RETURNS double\n" +
            "BEGIN\n" +
            "   RETURN d * 2;\n" +
            "END;\n" +
            "SELECT dbl(col_d) FROM result;\n";
    testScriptFile(scriptText, args(), "2.4691357824E8.*1.97530864396E9");
  }
Start up a local Hive Server 2 for these tests
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestHplSqlViaBeeLine.java