pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [pulsar] jerrypeng edited a comment on issue #3741: POJO AvroSchema always allowNull
Date Tue, 05 Mar 2019 07:11:50 GMT
jerrypeng edited a comment on issue #3741: POJO AvroSchema always allowNull
URL: https://github.com/apache/pulsar/issues/3741#issuecomment-469565479
   @sijie yup though I am not sure setting AllowNull is producing an incompatible schema.
 Incompatible to what?  I guess if a user wrote some code:
   and they didn't set allow null then it wouldn't be compatible with the current schema generated
from AvroSchema but my implementation could just have easily set allow null. 
   However, the in Java classes can be null and primitives cannot be.  Should we not preserve
that semantic?  Is ```Integer``` the same as ```int```? e.g.
    public static class Foo {
           int field1;
   generate the same AVRO schema as
    public static class Foo {
           Integer field1;
    Thus, this doesn't seem like big deal and arbitrary.  I think the bigger problem here
is the one with shading and how generated java classes are handled since that is a API/standard
that should work across systems.

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