Jackie-Jiang commented on code in PR #10042:
URL: https://github.com/apache/pinot/pull/10042#discussion_r1061857493
##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/SingleConnectionBrokerRequestHandler.java:
##########
@@ -106,13 +106,36 @@ protected BrokerResponseNative processBrokerRequest(long
requestId, BrokerReques
serverBrokerRequest.getPinotQuery().putToQueryOptions(CommonConstants.Broker.Request.TRACE,
"true");
}
+ // broker short-circuit for `select` and `select distinct` queries without
`ORDER BY`
+ boolean orderByPresent = false;
Review Comment:
Checking if select is present is not enough to determine if the query is
select/select distinct. We can use
`!QueryContextUtils.isAggregationQuery(query) && query.getOrderByExpressions()
== null`, but we will need to first construct the `QueryContext` from the
`PinotQuery`. This conversion is not very cheap, so we should try to do this
conversion only once in the request handler, and pass it to the reducer
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]