drcrallen commented on a change in pull request #5913: Move Caching Cluster
Client to java streams and allow parallel intermediate merges
URL: https://github.com/apache/incubator-druid/pull/5913#discussion_r213771252
##########
File path: processing/src/main/java/io/druid/query/QueryContexts.java
##########
@@ -218,6 +239,12 @@
return val == null ? defaultValue : Numbers.parseLong(val);
}
+ static <T> OptionalLong parseLong(Query<T> query, String key)
Review comment:
They were also written before `Optional` was in the java spec. It feels odd
to me to have the defaults passed around from the caller to this class just to
reflect it back. IMHO a long term solution should just give the `Optional` back
in all cases, and let the caller figure out what to do if there is nothing
present. The default value would then be handled in the caller completely, or
an exception or other case can be executed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]