eolivelli opened a new pull request #8883:
URL: https://github.com/apache/pulsar/pull/8883


   Describe the bug
   It looks like GenericJsonReader is not handling correctly null values
   
   This is a reproducer:
   
    byte[] json = "{\"somefield\":null}".getBytes();
       GenericJsonRecord record =
               new GenericJsonReader(Collections.singletonList(new 
Field("somefield", 0)))
                       .read(json, 0, json.length);
       assert record.getJsonNode().get("somefield").isNull();
       assert "null".equals(record.getField("somefield"));
       assert record.getField("somefield") != null;
   Expected behavior
   The null value is not converted to a string, but it is still a null value
   
   Additional context
   The problem affects Pulsar Functions/Pulsar IO
   
   Fixes #8882 


----------------------------------------------------------------
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:
[email protected]


Reply via email to