@Test
public void testUDFContextReset() throws Exception {
PigServer pig = new PigServer(ExecType.LOCAL, new Properties());
pig.registerQuery(" l = load 'file' as (a :int, b : int, c : int);");
pig.registerQuery(" f = foreach l generate a, b;");
pig.explain("f", System.out);
Properties props = UDFContext.getUDFContext().getUDFProperties(PigStorage.class);
// required fields property should be set because f results does not
// require the third column c, so properties should not be null
assertNotNull(props.get("l"));