Hi Team,

I am working on a hive - UDAF function in which I need to return a custom java 
object. Please let me know how can I implement this.
Also please let me know if any additional information required.

Return object :-

MAP < <Text> , <Custom Java Object : Child>  >

Custom Java Object :-

class Child {
private Text chldName;
             private Text mgrName;
             private Text chldId;
             private ArrayList<Child> reportees = new ArrayList<Child>();

             Child(Text id, Text name) {
                    this.chldId = id;
                    this.chldName = name;
             }

             public void setChldName(Text chldName) {
                    this.chldName = chldName;
             }

             void add(Child chld) {
                    if (chld != null && !reportees.contains(chld)) {
                           reportees.add(chld);
                    }
             }

             public ArrayList<Child> getReportees() {
                    return reportees;
             }
}



Thanks,
Rathish A M


[http://www.cisco.com/web/europe/images/email/signature/logo05.jpg]

Rathish Alikkal Madathil
Technical Lead
ralik...@cisco.com
Phone: +91 80 4426 2963

Cisco Systems Limited




IN
Cisco.com<http://www.cisco.com>





[Think before you print.]Think before you print.

This email may contain confidential and privileged material for the sole use of 
the intended recipient. Any review, use, distribution or disclosure by others 
is strictly prohibited. If you are not the intended recipient (or authorized to 
receive for the recipient), please contact the sender by reply email and delete 
all copies of this message.
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html



Reply via email to