kishoreg commented on a change in pull request #4786: Add query options from
json to existing query options, instead of overriding
URL: https://github.com/apache/incubator-pinot/pull/4786#discussion_r342800926
##########
File path:
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
##########
@@ -231,9 +231,15 @@ public BrokerResponse handleRequest(JsonNode request,
@Nullable RequesterIdentit
}
if (request.has(Broker.Request.QUERY_OPTIONS)) {
- Map<String, String> queryOptions = getOptionsFromRequest(request,
Broker.Request.QUERY_OPTIONS);
- LOGGER.debug("Query options are set to: {} for request {}: {}",
queryOptions, requestId, query);
- brokerRequest.setQueryOptions(queryOptions);
+ Map<String, String> queryOptionsFromRequest =
getOptionsFromRequest(request, Broker.Request.QUERY_OPTIONS);
Review comment:
its probably better to create another map queryOptions.
queryOptions = new HashMap();
if(queryOptionsFromRequest != null) {
queryOptions.addAll(queryOptionsFromRequest)
}
if(queryOptionsFromSQL != null) {
queryOptions.addAll(queryOptionsFromSQL)
}
brokerRequest.setQueryOptions(queryOptions);
----------------------------------------------------------------
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]