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

Table API Bridge `toDataStream(targetDataType)` function not working correctly for Java List

    XMLWordPrintableJSON

Details

    Description

      When the code below is executed, only the first element of the list is assigned to the List variable in MyPoJo repeatedly.

      case class Item(
        name: String
      )
      case class MyPojo(
        @DataTypeHist("RAW") items: java.util.List[Item]
      )
      
      ...
      
      tableEnv
        .sqlQuery("select items from table")
        .toDataStream(DataTypes.of(classOf[MyPoJo])) 

       

      For example, if you have the following list coming in as input,
      ["a","b","c"]
      The value actually stored in MyPojo's list variable is
      ["a","a","a"] 

      Attachments

        Activity

          People

            Unassigned Unassigned
            tanee.kim Tan Kim
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: