RE: Questions about java enum when convert DataStream to Table

2023-08-02 Thread Jiabao Sun
Hi haishui, The enum type cannot be mapped as flink table type directly. I think the easiest way is to convert enum to string type first: DataStreamSource> source = env.fromElements( new Tuple2<>("1", TestEnum.A.name()), new Tuple2<>("2", TestEnum.B.name()) ); Or add a map trans

Questions about java enum when convert DataStream to Table

2023-08-01 Thread haishui
I want to convert dataStream to Table. The type of dataSream is a POJO, which contains a enum field. 1. The enum field is RAW('classname', '...') in table. When I execute `SELECT * FROM t_test` and print the result, It throws EOFException. 2. If I assign the field is STRING in schema, It throws