walterddr commented on code in PR #11587:
URL: https://github.com/apache/pinot/pull/11587#discussion_r1325074400
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/QueryRunner.java:
##########
@@ -199,21 +201,54 @@ public void processQuery(DistributedStagePlan
distributedStagePlan, Map<String,
_opChainScheduler.register(opChain);
}
- private void setStageCustomProperties(Map<String, String> customProperties,
Map<String, String> requestMetadata) {
+ public void cancel(long requestId) {
+ _opChainScheduler.cancel(requestId);
+ }
+
+ private OpChain compileLeafStage(OpChainExecutionContext executionContext,
+ DistributedStagePlan distributedStagePlan) {
+ List<ServerPlanRequestContext> serverPlanRequestContexts =
+ ServerPlanRequestUtils.constructServerQueryRequests(executionContext,
distributedStagePlan,
+ _helixManager.getHelixPropertyStore());
+ List<ServerQueryRequest> serverQueryRequests = new
ArrayList<>(serverPlanRequestContexts.size());
+ long queryArrivalTimeMs = System.currentTimeMillis();
+ for (ServerPlanRequestContext requestContext : serverPlanRequestContexts) {
+ serverQueryRequests.add(
+ new ServerQueryRequest(requestContext.getInstanceRequest(),
_serverMetrics, queryArrivalTimeMs, true));
+ }
+ MailboxSendNode sendNode = (MailboxSendNode)
distributedStagePlan.getStageRoot();
+ MultiStageOperator leafStageOperator =
+ new LeafStageTransferableBlockOperator(executionContext,
serverQueryRequests, sendNode.getDataSchema(),
+ _leafQueryExecutor, _executorService);
+ MailboxSendOperator mailboxSendOperator =
+ new MailboxSendOperator(executionContext, leafStageOperator,
sendNode.getDistributionType(),
+ sendNode.getPartitionKeySelector(), sendNode.getCollationKeys(),
sendNode.getCollationDirections(),
+ sendNode.isSortOnSender(), sendNode.getReceiverStageId());
+ return new OpChain(executionContext, mailboxSendOperator);
+ }
+
+ private Map<String, String> consolidateMetadata(Map<String, String>
customProperties,
+ Map<String, String> requestMetadataOriginal) {
+ Map<String, String> requestMetadata = new HashMap<>();
+ // first put all custom Properties
+ requestMetadata.putAll(customProperties);
+ // put all overrides from request
+ requestMetadata.putAll(requestMetadataOriginal);
Review Comment:
this changes the previous behavior. i will separate that into a different PR
outside of this bugfix
--
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]