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

 ##########
 File path: 
processing/src/main/java/org/apache/druid/query/context/ResponseContext.java
 ##########
 @@ -76,56 +138,128 @@ public static ResponseContext createEmpty()
     return DefaultResponseContext.createEmpty();
   }
 
-  protected abstract Map<String, Object> getDelegate();
-
-  public Object put(String key, Object value)
+  public static ResponseContext deserialize(String responseContext, 
ObjectMapper objectMapper) throws IOException
   {
-    return getDelegate().put(key, value);
+    final Map<String, Object> delegate = objectMapper.readValue(
+        responseContext,
+        JacksonUtils.TYPE_REFERENCE_MAP_STRING_OBJECT
+    );
+    return new ResponseContext()
 
 Review comment:
   Resulting ResponseContext depends on a TypeReference so in general in case 
of changing the TypeReference the resulting context should be also updated. To 
eliminate the possible resulting context update I used the inner class. If that 
fits I can add this description as a comment, if not I may remove inner class 
usage and use DefaultReponseContext as a resulting map.

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

Reply via email to