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

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

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            tanee.kim Tan Kim

            Dates

              Created:
              Updated:

              Slack

                Issue deployment