Pojo List and Map Data Type in UDFs

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Pojo List and Map Data Type in UDFs

lec ssmi
Hi:
  I received a java pojo serialized json string from kafka,  and I want to use UDTF to restore it to a table with a similar structure to pojo.
  Some  member variables of pojo use the List type or Map type  whose generic  type  is also a pojo .
  The sample code as bellow:

   public class Car {
      private String name;
      private Integer id;
     private  List<Person> drivers;
    setters and getters .....

  }

  I want to  I want to convert it into a table with three columns of id, name, drivers. And the type of Driver column is Array. Each driver element can be taken out of the driver by index.
  Does the current  API support this  complex type of pojo?

 Thanks.