private static void setupAllTypesTable(IDriver driver) throws Exception {
      String[] primitiveData = new String[primitiveRows.length];
      for (int i = 0; i < primitiveRows.length; i++) {
        Object[] rowData = primitiveRows[i];
        StringBuilder row = new StringBuilder();
        for (Object cell : rowData) {
          row.append(row.length() == 0 ? "" : "\t").append(cell == null ? null : cell);
        }
        primitiveData[i] = row.toString();
      }
      HcatTestUtils.createTestDataFile(ALL_TYPES_FILE_NAME, primitiveData);
      String cmd = "create table " + ALL_PRIMITIVE_TYPES_TABLE + ALL_TYPES_SCHEMA +
          "ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'" +
          " STORED AS TEXTFILE";
      executeStatementOnDriver(cmd, driver);
      cmd = "load data local inpath '" + HCatUtil.makePathASafeFileName(ALL_TYPES_FILE_NAME) +
          "' into table " + ALL_PRIMITIVE_TYPES_TABLE;
      executeStatementOnDriver(cmd, driver);
    }
Test that value from Hive table are read properly in Pig
hcatalog/hcatalog-pig-adapter/src/test/java/org/apache/hive/hcatalog/pig/AbstractHCatLoaderTest.java