leventov commented on a change in pull request #8157: Enum of ResponseContext
keys
URL: https://github.com/apache/incubator-druid/pull/8157#discussion_r307362077
##########
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:
Please comment on why it creates an inner class instead of creating a
`DefaultResponseContext`.
----------------------------------------------------------------
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]