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

Turn Json String into Row

    XMLWordPrintableJSON

Details

    Description

      schema has  three params ,a,b,c

      message a:{ "a": 1, "b": 1, "c": 2}   

      message b:{ "a": 1, "b": null, "c": 2}   

      message c:{ "a": 1,  "c": 2}   

       the schema is a,b,c  running the code as bleow

      Row row = new Row(RowKind.INSERT,3);
      row.setField(0,1);
      row.setField(1,2);
      row.setField(2,3);
      System.out.println(row);

      a:1,2,3

      b:1,null,3

      c:1,null,3

      turn message into row , message a is ok, but we cant distinguish message b and message c if we use null, when deal message c ,we must use like NaN row(2,NaN),  i think row need a easy way to show message b and message c  with row

        

       

       

       

       

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            tonychan tonychan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: