esevastyanov commented on a change in pull request #8157: Enum of
ResponseContext keys
URL: https://github.com/apache/incubator-druid/pull/8157#discussion_r310223825
##########
File path:
processing/src/main/java/org/apache/druid/query/context/ResponseContext.java
##########
@@ -342,26 +348,22 @@ public SerializationResult serializeWith(ObjectMapper
objectMapper, int maxChars
final JsonNode node = e.getValue();
if (node.isArray()) {
if (needToRemoveCharsNumber >= node.toString().length()) {
- final int lengthBeforeRemove = node.toString().length();
- // Empty array could be correctly deserialized so we remove only
its elements.
- ((ArrayNode) node).removeAll();
- final int lengthAfterRemove = node.toString().length();
- needToRemoveCharsNumber -= lengthBeforeRemove - lengthAfterRemove;
+ // We need to remove more chars than the field's lenght so
removing it completely
Review comment:
fixed both typos
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]