fx19880617 commented on a change in pull request #5513: URL: https://github.com/apache/incubator-pinot/pull/5513#discussion_r437766763
########## File path: pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java ########## @@ -184,6 +192,18 @@ public BrokerResponse handleRequest(JsonNode request, @Nullable RequesterIdentit requestStatistics.setErrorCode(QueryException.PQL_PARSING_ERROR_CODE); return new BrokerResponseNative(QueryException.getException(QueryException.PQL_PARSING_ERROR, e)); } + if (isLiteralOnlyQuery(brokerRequest)) { + LOGGER.info("Request {} contains only Literal, skipping server query: {}", requestId, query); + try { + BrokerResponse brokerResponse = + processLiteralOnlyBrokerRequest(brokerRequest, compilationStartTimeNs, requestStatistics); + return brokerResponse; + } catch (IllegalStateException e) { Review comment: I see. My purpose here is to prevent broken query pushing down to servers for further processing. E.g. Function AS has two arguments first is any expression, second is an identifier, however if it's not, then typically it means the query is not writing correct. I'll change it to catch all exceptions and add a TODO for further refinements. ---------------------------------------------------------------- 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