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 2021/12/17 15:06:52 UTC

[GitHub] [pulsar] liangyepianzhou opened a new pull request #13384: [Schema] Display null fields in SchemaInfo

liangyepianzhou opened a new pull request #13384:
URL: https://github.com/apache/pulsar/pull/13384


   ### Motivation
   The null field may also be important in some scenarios, so we should include the null field when getting the json string.
   Such as:
   * we excepted
   > {
     "type": "record",
     "name": "Student",
     "namespace": "org.apache.pulsar.broker.transaction.TestConsumer",
     "fields": [
       {
         "name": "name",
         "type": [
           "null",
           "string"
         ],
         "default": null
       }
     ]
   }
   >
   * Instead of 
   > {
     "type": "record",
     "name": "Student",
     "namespace": "org.apache.pulsar.broker.transaction.TestConsumer",
     "fields": [
       {
         "name": "name",
         "type": [
           "null",
           "string"
         ],
       }
     ]
   }
   >
   * The  schema
   >  @NoArgsConstructor
       public static class Student {
           @Nullable
           private String name;
       }
   >    
   ### Modification
   Add `.serializeNulls()` when build a `gsonBuilder`
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:
   
   *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): (yes / no)
     - The public API: (yes / no)
     - The schema: (yes / no / don't know)
     - The default values of configurations: (yes / no)
     - The wire protocol: (yes / no)
     - The rest endpoints: (yes / no)
     - The admin cli options: (yes / no)
     - Anything that affects deployment: (yes / no / don't know)
   
   ### Documentation
   
   Check the box below and label this PR (if you have committer privilege).
   
   Need to update docs? 
   
   - [ ] `doc-required` 
     
     (If you need help on updating docs, create a doc issue)
     
   - [x] `no-need-doc` 
     
     (Please explain why)
     
   - [ ] `doc` 
     
     (If this PR contains doc changes)
   
   
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] github-actions[bot] commented on pull request #13384: [Schema] Display null fields in SchemaInfo

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #13384:
URL: https://github.com/apache/pulsar/pull/13384#issuecomment-1072917084


   The pr had no activity for 30 days, mark with Stale label.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org