pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [pulsar] sijie commented on issue #3752: revise the schema default type not null
Date Tue, 05 Mar 2019 05:59:31 GMT
sijie commented on issue #3752: revise the schema default type not null
URL: https://github.com/apache/pulsar/pull/3752#issuecomment-469550028
   > The user defined will still be the same though, as the data serialized by it.
   the user defined will be still the same. that's fine.
   but in a AllowNull schema, a record can be omitting fields; but in a NOT AllowNull schema,
all fields have constraints. so if a record is serialized with AllowNull schema is not *SAFE*
to be deserialized by a NOT AllowNull schema even the user defined POJO are same. 
   The other way around is working - you are okay to use a AllowNull schema to deserialize
the data serialized by a NOT AllowNull schema. 
   With that being explained, if we are using POJO schema, we can't really just "migrate"
the schema in schema registry (or it is very very tricky to do so). We can do it by using
MultiVersionedGenericSchema which I introduced a few days ago. For each message, it will be
using the right schema to deserialize the record into a `GenericRecord`. But that's probably
not useful for applications are using POJO schemas.

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:

With regards,
Apache Git Services

View raw message