Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-12412

Allow ListTypeInfo used for java.util.List and MapTypeInfo used for java.util.Map

    XMLWordPrintableJSON

Details

    Description

       

      // code placeholder
      public static class UserBehavior { 
        public long userId;
        public long itemId;  
        public int categoryId; 
        public long timestamp;  
        public List<String> comments; 
      }
      
      public static void main(String[] args) throws Exception { 
        PojoTypeInfo<UserBehavior> pojoType = (PojoTypeInfo<UserBehavior>) TypeExtractor.createTypeInfo(UserBehavior.class); 
      }
      
      
      

       

      The filed comments in UserBehavior will be extracted by TypeExtractor to GenericType .

      I think it can be extracted to ListTypeInfo .

      This would be a big improvement as in many cases classes including List or Map

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              yangfei YangFei
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m