FrankChen021 commented on code in PR #12833:
URL: https://github.com/apache/druid/pull/12833#discussion_r932817228
##########
processing/src/main/java/org/apache/druid/query/groupby/GroupByQueryConfig.java:
##########
@@ -338,8 +359,11 @@ public GroupByQueryConfig withOverrides(final GroupByQuery
query)
CTX_KEY_BUFFER_GROUPER_INITIAL_BUCKETS,
getBufferGrouperInitialBuckets()
);
+ // If the client overrides do not provide "maxOnDiskStorage" context key,
the server side "defaultOnDiskStorage"
+ // value is used in the calculation of the newConfig value of
maxOnDiskStorage. This allows the operator to
+ // choose a default value lower than the max allowed when the context key
is missing in the client query.
newConfig.maxOnDiskStorage = Math.min(
- ((Number) query.getContextValue(CTX_KEY_MAX_ON_DISK_STORAGE,
getMaxOnDiskStorage())).longValue(),
+ ((Number) query.getContextValue(CTX_KEY_MAX_ON_DISK_STORAGE,
getDefaultOnDiskStorage())).longValue(),
Review Comment:
If both max and default config are changed to type of `HumanReadableBytes`,
I think we need a new interface(for example `getHumanReadableContextValue`) on
QueryContext to support values in these format:
1. number
2. number in string format (in case of #12760)
3. human readable format
`HumanReadableBytes.parse` can handle the latter two cases.
--
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]