Skip to content

Commit

Permalink
Address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackie-Jiang committed Nov 3, 2023
1 parent 14b42f5 commit 542128d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,7 @@ protected BrokerResponse handleRequest(long requestId, String query, @Nullable S
setMaxServerResponseSizeBytes(numServers, queryOptions, offlineTableConfig);
// Set the query option to directly return final result for single server query unless it is explicitly disabled
if (numServers == 1) {
// Set the same flag in the original server request to be used in the reduce phase for hybrid table
if (queryOptions.putIfAbsent(QueryOptionKey.SERVER_RETURN_FINAL_RESULT, "true") == null
&& offlineBrokerRequest != serverBrokerRequest) {
serverBrokerRequest.getPinotQuery().getQueryOptions()
Expand All @@ -711,8 +712,9 @@ protected BrokerResponse handleRequest(long requestId, String query, @Nullable S
setMaxServerResponseSizeBytes(numServers, queryOptions, realtimeTableConfig);
// Set the query option to directly return final result for single server query unless it is explicitly disabled
if (numServers == 1) {
// Set the same flag in the original server request to be used in the reduce phase for hybrid table
if (queryOptions.putIfAbsent(QueryOptionKey.SERVER_RETURN_FINAL_RESULT, "true") == null
&& offlineBrokerRequest != serverBrokerRequest) {
&& realtimeBrokerRequest != serverBrokerRequest) {
serverBrokerRequest.getPinotQuery().getQueryOptions()
.put(QueryOptionKey.SERVER_RETURN_FINAL_RESULT, "true");
}
Expand Down

0 comments on commit 542128d

Please sign in to comment.