You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by eric hoffmann <si...@gmail.com> on 2022/08/27 12:17:59 UTC

Use genericrowdata or row type

Hi ,
Im using flink 1.15, i mostly use datastream api, do you suggest i use row
or genericrowdata that inherit rowdata for my data structure?
Thx

Re:Use genericrowdata or row type

Posted by Xuyang <xy...@163.com>.
Hi, IMO, I think you'd better use 'Row' instead of using 'genericrowdata' because 'GenericRowData' is only one sub-class implement from 'RowData', and 'RowData' has other sub-classes that are used in different scenes.


 Actually, the two types can be converted to each other [1].




[1] https://github.com/apache/flink/blob/2220f24925ab5146d5771c3782ed8c0837bb0bc4/flink-table/flink-table-runtime/src/test/java/org/apache/flink/table/data/DataStructureConvertersTest.java#L250







--

    Best!
    Xuyang




At 2022-08-27 20:17:59, "eric hoffmann" <si...@gmail.com> wrote:

Hi ,
Im using flink 1.15, i mostly use datastream api, do you suggest i use row or genericrowdata that inherit rowdata for my data structure? 
Thx