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 2020/12/09 16:34:13 UTC
[GitHub] [pulsar] eolivelli opened a new pull request #8883: Issue 8882: GenericJsonReader converts the null value to string "null"
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:
users@infra.apache.org
[GitHub] [pulsar] eolivelli commented on pull request #8883: Issue 8882: GenericJsonReader converts the null value to string "null"
Posted by GitBox <gi...@apache.org>.
eolivelli commented on pull request #8883:
URL: https://github.com/apache/pulsar/pull/8883#issuecomment-741892016
This is a small fix, but I think it is well suited for cherrypick to 2.6.3 and 2.7.1
@codelipenghui
----------------------------------------------------------------
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
[GitHub] [pulsar] eolivelli commented on pull request #8883: Issue 8882: GenericJsonReader converts the null value to string "null"
Posted by GitBox <gi...@apache.org>.
eolivelli commented on pull request #8883:
URL: https://github.com/apache/pulsar/pull/8883#issuecomment-741904438
@wolfstudy can you please evaluate to add this to 2.6.3 release ?
----------------------------------------------------------------
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
[GitHub] [pulsar] sijie merged pull request #8883: Issue 8882: GenericJsonReader converts the null value to string "null"
Posted by GitBox <gi...@apache.org>.
sijie merged pull request #8883:
URL: https://github.com/apache/pulsar/pull/8883
----------------------------------------------------------------
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