@Test
  public void testUdfBoolean() throws Throwable {
    String scriptText =
        "DROP TABLE IF EXISTS result;\n" +
            "CREATE TABLE result (col_b boolean);\n" +
            "INSERT INTO result VALUES(true);\n" +
            "INSERT INTO result VALUES(false);\n" +
            "CREATE FUNCTION check(b boolean)\n" +
            "   RETURNS STRING\n" +
            "BEGIN\n" +
            "   RETURN 'This is ' || b;\n" +
            "END;\n" +
            "SELECT check(col_b) FROM result ORDER BY col_b ASC;\n";
    testScriptFile(scriptText, args(), "This is false.*This is true");
  }
Start up a local Hive Server 2 for these tests
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestHplSqlViaBeeLine.java