twalthr commented on issue #11568: URL: https://github.com/apache/flink/pull/11568#issuecomment-616393913
Having serde as part of a data type improves the usability a lot because we are hiding the complexity around this topic from users. A user must not care about serialization but can simply pass around a data type. Esp. when using complex nested POJOs where just one field needs special treatment, a dedicated type is very handy. In many cases, POJOs are predefined by some company-wide schema. So users are not allowed to change the type of a field to `byte[]` for a VARBINARY. I agree that a RAW string in a DDL looks terrible but in most of the cases such a string will be generated by some tool. In any case, we need a valid string that can be stored in a catalog to reduce friction in the end-to-end story. In the future, we can further improve the usability by proving a `DistinctType` for those type. Such as `CREATE TYPE MyRawType OF 'org.package.MyClass'` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
