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



##########
File path: 
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
##########
@@ -428,6 +463,29 @@ 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}, check if the WHERE clause will always 
evaluate to false. */
+  private boolean isFilterAlwaysFalse(BrokerRequest brokerRequest) {
+    return brokerRequest == null || brokerRequest.getPinotQuery() == null || (
+        brokerRequest.getPinotQuery().getFilterExpression() != null && 
brokerRequest.getPinotQuery()
+            .getFilterExpression().equals(FALSE));
+  }

Review comment:
       Hmm, when brokerRequest is `null`, returning `true` for 
`isFilterAlwaysFalse()` but returning `false` for `isFilterAlwaysTrue()` is 
confusing. Basically these 2 method does not apply to `null` brokerRequest.




-- 
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to