You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/03/05 03:22:31 UTC

[GitHub] [pulsar] sijie commented on issue #3752: revise the schema default type not null

sijie commented on issue #3752: revise the schema default type not null
URL: https://github.com/apache/pulsar/pull/3752#issuecomment-469521239
 
 
   @congbobo184 @jerrypeng @merlimat : 
   
   I don't think we should attempt to involve any data migration between schemas, that will be a nightmare.
   
   what I would suggest here:
   
   1) adding a flag `allowNull` (by default to be true for backward compatibility). users have ability to disable `allowNull`. 
   2) if user disabled `allowNull`, the AvroSchema will add a property entry `avro.allowNull = false` to the properties map of schema info. This property will be used for telling how the avro schema is generated. `avro.allowNull` doesn't exist or exists as true means the schema is generated using AllowNull; `avro.allowNull == false` means the schema is generated NOT using AllowNull.
   
   so there are nothing else to be changed. but the documentation should be updated to highlight `allowNull` will introduce incompatibilities when same POJO classes used in other AVRO system.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services