amrishlal commented on a change in pull request #6811:
URL: https://github.com/apache/incubator-pinot/pull/6811#discussion_r620895878



##########
File path: 
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
##########
@@ -428,6 +438,25 @@ public BrokerResponse handleRequest(JsonNode request, 
@Nullable RequesterIdentit
       _brokerMetrics.addMeteredTableValue(rawTableName, 
BrokerMeter.BROKER_RESPONSES_WITH_NUM_GROUPS_LIMIT_REACHED, 1);
     }
 
+    logBrokerResponse(requestStatistics, requestId, query, 
compilationStartTimeNs, brokerRequest,
+        numUnavailableSegments, serverStats, brokerResponse, 
executionEndTimeNs);
+    return brokerResponse;
+  }
+
+  /**
+   * Given a {@link BrokerRequest}, this function will determine if we can 
return a response without server-side query
+   * evaluation. This happens when the optimizer determines that the entire 
WHERE clause evaluates to false.
+   */
+  private boolean isResponsePossible(BrokerRequest brokerRequest) {

Review comment:
       Renamed to `isFilterAlwaysFalse` and also added `isFilterAlwaysTrue` to 
take care of all cases including setting `offlineBrokerRequest` or 
`realtimeBrokerRequest` to null if needed and dropping filter if filter will 
always evaluate to TRUE.




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



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

Reply via email to