leventov commented on a change in pull request #8157: Enum of ResponseContext 
keys
URL: https://github.com/apache/incubator-druid/pull/8157#discussion_r310213036
 
 

 ##########
 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:
   Typo, "length". There is one other instance of this typo in the repository, 
in `StringDimensionHandler` - please fix it too.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to