diff --git hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoader.java hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoader.java index ee3e750..4157602 100644 --- hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoader.java +++ hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/TestHCatLoader.java @@ -600,7 +600,11 @@ private static void testSchemaLoadPrimitiveTypes() throws IOException { * Test that value from Hive table are read properly in Pig */ private static void testReadDataPrimitiveTypes() throws Exception { - PigServer server = new PigServer(ExecType.LOCAL); + // testConvertBooleanToInt() sets HCatConstants.HCAT_DATA_CONVERT_BOOLEAN_TO_INTEGER=true, and + // might be the last one to call HCatContext.INSTANCE.setConf(). Make sure setting is false. + Properties properties = new Properties(); + properties.setProperty(HCatConstants.HCAT_DATA_CONVERT_BOOLEAN_TO_INTEGER, "false"); + PigServer server = new PigServer(ExecType.LOCAL, properties); server.registerQuery("X = load '" + ALL_PRIMITIVE_TYPES_TABLE + "' using " + HCatLoader.class.getName() + "();"); Iterator XIter = server.openIterator("X"); int numTuplesRead = 0;