weixiangsun commented on a change in pull request #8029:
URL: https://github.com/apache/pinot/pull/8029#discussion_r830414833
##########
File path:
pinot-core/src/test/java/org/apache/pinot/queries/BaseQueriesTest.java
##########
@@ -197,21 +198,31 @@ protected BrokerResponseNative
getBrokerResponseForSqlQuery(String sqlQuery, Pla
}
queryOptions.put(Request.QueryOptionKey.GROUP_BY_MODE, Request.SQL);
queryOptions.put(Request.QueryOptionKey.RESPONSE_FORMAT, Request.SQL);
+ BrokerRequest strippedBrokerRequest =
GapfillUtils.stripGapfill(brokerRequest);
+ queryOptions = strippedBrokerRequest.getPinotQuery().getQueryOptions();
+ if (queryOptions == null) {
+ queryOptions = new HashMap<>();
+ strippedBrokerRequest.getPinotQuery().setQueryOptions(queryOptions);
+ }
+ queryOptions.put(Request.QueryOptionKey.GROUP_BY_MODE, Request.SQL);
+ queryOptions.put(Request.QueryOptionKey.RESPONSE_FORMAT, Request.SQL);
QueryContext queryContext =
BrokerRequestToQueryContextConverter.convert(brokerRequest);
- return getBrokerResponse(queryContext, planMaker);
+ QueryContext strippedQueryContext =
BrokerRequestToQueryContextConverter.convert(strippedBrokerRequest);
+ return getBrokerResponse(queryContext, strippedQueryContext, planMaker);
}
/**
* Run query on multiple index segments with custom plan maker.
* <p>Use this to test the whole flow from server to broker.
* <p>The result should be equivalent to querying 4 identical index segments.
*/
- private BrokerResponseNative getBrokerResponse(QueryContext queryContext,
PlanMaker planMaker) {
+ private BrokerResponseNative getBrokerResponse(
+ QueryContext queryContext, QueryContext strippedQueryContext, PlanMaker
planMaker) {
Review comment:
Fixed
--
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]