gortiz commented on code in PR #18458:
URL: https://github.com/apache/pinot/pull/18458#discussion_r3289120522
##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/MultiStageBrokerRequestHandler.java:
##########
@@ -655,10 +661,18 @@ private BrokerResponse
query(QueryEnvironment.CompiledQuery query, long requestI
_stagesStartedMeter.mark(stageCount);
_opchainsStartedMeter.mark(opChainCount);
+ // Inject the cluster-default stream-stats mode unless the query already
overrides it.
+ Map<String, String> effectiveOptions = query.getOptions();
+ if (_streamStats && !effectiveOptions.containsKey(
+ CommonConstants.Broker.Request.QueryOptionKey.STREAM_STATS)) {
+ effectiveOptions = new HashMap<>(effectiveOptions);
Review Comment:
Fixed. Rather than threading the default through
`compileQuery`/`getQueryEnvConf`, I stored `_streamStatsDefault` as a `boolean`
field on `QueryDispatcher` (initialized once from broker config and passed
through its constructor). `QueryDispatcher.submitAndReduce` calls
`QueryOptionsUtils.isStreamStats(queryOptions, _streamStatsDefault)` directly,
so no HashMap is allocated. The broker handler no longer has any per-query map
injection for this flag.
--
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]