static void testSchemaLoadPrimitiveTypes() throws IOException {
      PigServer server = createPigServer(false);
      server.registerQuery("X = load '" + ALL_PRIMITIVE_TYPES_TABLE + "' using " + HCatLoader.class.getName() + "();");
      Schema dumpedXSchema = server.dumpSchema("X");
      List<FieldSchema> Xfields = dumpedXSchema.getFields();
      assertEquals("Expected " + HCatFieldSchema.Type.numPrimitiveTypes() + " fields, found " +
          Xfields.size(), HCatFieldSchema.Type.numPrimitiveTypes(), Xfields.size());
      checkProjection(Xfields.get(0), "c_boolean", DataType.BOOLEAN);
      checkProjection(Xfields.get(1), "c_tinyint", DataType.INTEGER);
      checkProjection(Xfields.get(2), "c_smallint", DataType.INTEGER);
      checkProjection(Xfields.get(3), "c_int", DataType.INTEGER);
      checkProjection(Xfields.get(4), "c_bigint", DataType.LONG);
      checkProjection(Xfields.get(5), "c_float", DataType.FLOAT);
      checkProjection(Xfields.get(6), "c_double", DataType.DOUBLE);
      checkProjection(Xfields.get(7), "c_decimal", DataType.BIGDECIMAL);
      checkProjection(Xfields.get(8), "c_string", DataType.CHARARRAY);
      checkProjection(Xfields.get(9), "c_char", DataType.CHARARRAY);
      checkProjection(Xfields.get(10), "c_varchar", DataType.CHARARRAY);
      checkProjection(Xfields.get(11), "c_binary", DataType.BYTEARRAY);
      checkProjection(Xfields.get(12), "c_date", DataType.DATETIME);
      checkProjection(Xfields.get(13), "c_timestamp", DataType.DATETIME);
    }
Test that we properly translate data types in Hive/HCat table schema into Pig schema
hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/AbstractHCatLoaderTest.java