Hi,
I have to agree with what Huang and Jingsong said. We should think more
about it from the user's(developers who use the API) perspective. The first
method T deserialize(byte[]) is convenient for users to deserialize a
single event. Many formats are using it, i.e. Avro, csv, etc. There should
a
I share the same concerns with Jingsong and Hang, however, I'll raise a
point why keeping both is also not a good idea.
In FLINK-18590[1], we are introducing a feature that we'll deserialize JSON
array into multiple records. This feature can only be used in `void
deserialize(byte[] message, Collec
- `T deserialize(byte[] message)` is widely used and it is a public
api. It is very friendly for single record deserializers.
- `void deserialize(byte[] message, Collector out)` supports
multiple records.
I think we can just keep them as they are.
Best,
Jingsong
On Tue, Feb 28, 2023 at 3:08 PM
Hi, Shammon,
I think the method `void deserialize(byte[] message, Collector out)`
with a default implementation encapsulate how to deal with null for
developers. If we remove the `T deserialize(byte[] message)`, the
developers have to remember to handle null. Maybe we will get duplicate
code among