suneet-s commented on code in PR #12833:
URL: https://github.com/apache/druid/pull/12833#discussion_r939226814


##########
processing/src/main/java/org/apache/druid/query/Query.java:
##########
@@ -129,6 +130,8 @@ default QueryContext getQueryContext()
 
   boolean getContextBoolean(String key, boolean defaultValue);
 
+  HumanReadableBytes getContextHumanReadableBytes(String key, 
HumanReadableBytes defaultValue);

Review Comment:
   Since `Query` is marked as an `ExtensionPoint` I think we should introduce a 
default implementation of this method to help users who may have extended this 
class upgrade to this version of Druid without having to make a modification to 
their extension. The default implementation could be something like
   
   ```
   default HumanReadableBytes getContextHumanReadableBytes(String key, 
HumanReadableBytes defaultValue) {
     if (getQueryContext != null) {
       return getQueryContext().getAsHumanReadableBytes(key, defaultValue);
     }
   }
   ```



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to