From commits-return-23783-archive-asf-public=cust-asf.ponee.io@pulsar.apache.org Tue Mar 5 06:19:39 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 46CD018067C for ; Tue, 5 Mar 2019 07:19:39 +0100 (CET) Received: (qmail 60857 invoked by uid 500); 5 Mar 2019 06:19:38 -0000 Mailing-List: contact commits-help@pulsar.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pulsar.apache.org Delivered-To: mailing list commits@pulsar.apache.org Received: (qmail 60844 invoked by uid 99); 5 Mar 2019 06:19:38 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Mar 2019 06:19:38 +0000 From: GitBox To: commits@pulsar.apache.org Subject: [GitHub] [pulsar] sijie edited a comment on issue #3741: POJO AvroSchema always allowNull Message-ID: <155176677783.6025.16907105591344166400.gitbox@gitbox.apache.org> Date: Tue, 05 Mar 2019 06:19:37 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit sijie edited a comment on issue #3741: POJO AvroSchema always allowNull URL: https://github.com/apache/pulsar/issues/3741#issuecomment-469554352 @jerrypeng I got a different result than yours ``` log.info("Pulsar AllowNull :{}", new String(AvroSchema.of(User.class).getSchemaInfo().getSchema())); log.info("Avro AllowNull :{}", ReflectData.AllowNull.get().getSchema(User.class)); log.info("Avro Not AllowNull :{}", ReflectData.get().getSchema(User.class)); ``` ``` Pulsar AllowNull :{"type":"record","name":"User","namespace":"example.avro","fields":[{"name":"name","type":["null","string"],"default":null},{"name":"favorite_number","type":["null","int"],"default":null},{"name":"favorite_color","type":["null","string"],"default":null},{"name":"age","type":"int"}]} Avro Not AllowNull :{"type":"record","name":"User","namespace":"example.avro","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":"string"},{"name":"age","type":"int","default":19}]} Avro AllowNull :{"type":"record","name":"User","namespace":"example.avro","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":"string"},{"name":"age","type":"int","default":19}]} ``` ---------------------------------------------------------------- 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