.setName("fld1").setType(DataType.DOUBLE),
new ResourceFieldSchema()
.setName("fld2").setType(DataType.INTEGER)
};
ResourceSchema rSchema0 = new ResourceSchema()
.setFields(level0);
ResourceFieldSchema[] level1 =
new ResourceFieldSchema[] {
new ResourceFieldSchema()
.setName("t1").setType(DataType.TUPLE)
.setSchema(rSchema0)
};
ResourceSchema rSchema1 = new ResourceSchema()
.setFields(level1);
ResourceFieldSchema[] level2 =
new ResourceFieldSchema[] {
new ResourceFieldSchema()
.setName("t2").setType(DataType.BAG)
.setSchema(rSchema1)
};
ResourceSchema origSchema = new ResourceSchema()
.setFields(level2);
Schema pSchema = Schema.getPigSchema(origSchema);
assertTrue(CheckTwoLevelAccess(pSchema));
assertTrue(ResourceSchema.equals(origSchema, new ResourceSchema(pSchema)));
}