ThriftToPig { public static Schema toSchema(Class<? extends TBase<?, ?>> tClass) { return toSchema(TStructDescriptor.getInstance(tClass)); } ThriftToPig(Class<M> tClass); static ThriftToPig<M> newInstance(Class<M> tClass); static ThriftToPig<M> newInstance(TypeRef<M> typeRef); TStructDescriptor getTStructDescriptor(); Tuple getPigTuple(M thriftObj); Tuple getLazyTuple(M thriftObj); static void setConversionProperties(Configuration conf); @SuppressWarnings("unchecked") static Object toPigObject(Field field, Object value, boolean lazy); static Schema toSchema(Class<? extends TBase<?, ?>> tClass); Schema toSchema(); static Schema toSchema(TStructDescriptor tDesc); static String toPigScript(Class<? extends TBase<?, ?>> thriftClass,
                                   Class<? extends LoadFunc> pigLoader); static void stringifySchema(StringBuilder sb,
                                     Schema schema,
                                     byte type,
                                     StringBuilder prefix); static void main(String[] args); static final Logger LOG; }
@Test public void testMapValueFieldAlias() throws FrontendException { ThriftToPig<TestMap> thriftToPig = new ThriftToPig<TestMap>(TestMap.class); Schema schema = thriftToPig.toSchema(); Assert.assertEquals("{name: chararray,names: map[chararray]}", schema.toString()); Assert.assertNull(schema.getField(1).schema.getField(0).alias); schema = ThriftToPig.toSchema(TestMap.class); Assert.assertEquals("{name: chararray,names: map[chararray]}", schema.toString()); Assert.assertNull(schema.getField(1).schema.getField(0).alias); }