somandal commented on code in PR #10570:
URL: https://github.com/apache/pinot/pull/10570#discussion_r1160309683
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/plan/PhysicalPlanVisitor.java:
##########
@@ -61,12 +63,20 @@ public static OpChain build(StageNode node,
PlanRequestContext context) {
@Override
public MultiStageOperator visitMailboxReceive(MailboxReceiveNode node,
PlanRequestContext context) {
- MailboxReceiveOperator mailboxReceiveOperator =
- new MailboxReceiveOperator(context.getOpChainExecutionContext(),
node.getExchangeType(),
- node.getCollationKeys(), node.getCollationDirections(),
node.isSortOnSender(), node.isSortOnReceiver(),
- node.getDataSchema(), node.getSenderStageId(), node.getStageId());
- context.addReceivingMailboxes(mailboxReceiveOperator.getSendingMailbox());
- return mailboxReceiveOperator;
+ if (!CollectionUtils.isEmpty(node.getCollationKeys()) &&
node.isSortOnReceiver()) {
Review Comment:
Collation keys should not be empty to use `node.isSortOnReceiver()`, but the
opposite is possible. We can have collation keys as not empty, but the
`isSortOnReceiver` is false. In this case I'll be creating a normal
`MailboxSendOperator` instead of the sorted version. This is useful for
scenarios where the data is partitioned and sorted on the sender in the future,
in which case the receiver sort is a no-op.
--
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]