@Test
  public void testDecimalCast() throws Throwable {
    String scriptText =
        "DECLARE\n" +
        "a DECIMAL(10,2);\n" +
        "BEGIN\n" +
        "SELECT CAST('10.5' AS DECIMAL(10,2)) as t INTO a;\n" +
        "print (a);\n" +
        "END;\n" +
        "/";
    testScriptFile(scriptText, args(), "10.50", OutStream.ERR);
  }
Start up a local Hive Server 2 for these tests
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestHplSqlViaBeeLine.java