Re: getStructFieldData method on StructObjectInspector

2012-06-05 Thread kulkarni.swar...@gmail.com
Thanks Edward for your reply on this. Would you mind giving a very small example on how a struct corresponds to a Map? I am having hard time understanding what the K/V pairs in the map would look like. Thanks again. On Tue, May 29, 2012 at 10:16 AM, Edward Capriolo wrote: > Returning custom wri

Re: getStructFieldData method on StructObjectInspector

2012-05-29 Thread Edward Capriolo
Returning custom writables will not work. In most cases the methods return Object because the types can be many things that do not fall under a single superclass other then object. like Integer,IntWritable, Array, or Map. In your case, a struct corresponds to a Map. On Tue, May 29, 2012 at 11:08 A

Re: getStructFieldData method on StructObjectInspector

2012-05-29 Thread kulkarni.swar...@gmail.com
If someone can help understand this, I would really appreciate. On Fri, May 25, 2012 at 3:58 PM, kulkarni.swar...@gmail.com < kulkarni.swar...@gmail.com> wrote: > I am trying to write a custom ObjectInspector extending the > StructObjectInspector and got a little confused about the use of the > g

getStructFieldData method on StructObjectInspector

2012-05-25 Thread kulkarni.swar...@gmail.com
I am trying to write a custom ObjectInspector extending the StructObjectInspector and got a little confused about the use of the getStructFieldData method on the inspector. Looking at the definition of the method: public Object getStructFieldData(Object data, StructField fieldRef); I understand t