gortiz commented on code in PR #14495:
URL: https://github.com/apache/pinot/pull/14495#discussion_r1849804457


##########
pinot-query-planner/src/main/java/org/apache/pinot/query/planner/plannode/MailboxSendNode.java:
##########
@@ -50,8 +55,50 @@ public MailboxSendNode(int stageId, DataSchema dataSchema, 
List<PlanNode> inputs
     _sort = sort;
   }
 
+  public MailboxSendNode(int stageId, DataSchema dataSchema, List<PlanNode> 
inputs,
+      int receiverStage, PinotRelExchangeType exchangeType,
+      RelDistribution.Type distributionType, @Nullable List<Integer> keys, 
boolean prePartitioned,
+      @Nullable List<RelFieldCollation> collations, boolean sort) {
+    this(stageId, dataSchema, inputs, toBitSet(receiverStage), exchangeType, 
distributionType, keys, prePartitioned,
+        collations, sort);
+  }
+
+  private static BitSet toBitSet(int receiverStage) {
+    BitSet bitSet = new BitSet(receiverStage + 1);
+    bitSet.set(receiverStage);
+    return bitSet;
+  }
+
+  public MailboxSendNode(int stageId, DataSchema dataSchema, List<PlanNode> 
inputs,
+      PinotRelExchangeType exchangeType, RelDistribution.Type 
distributionType, @Nullable List<Integer> keys,
+      boolean prePartitioned, @Nullable List<RelFieldCollation> collations, 
boolean sort) {
+    this(stageId, dataSchema, inputs, null, exchangeType, distributionType, 
keys, prePartitioned, collations, sort);
+  }
+
+  public BitSet getReceiverStages() {
+    Preconditions.checkState(_receiverStages != null && 
!_receiverStages.isEmpty(), "Receivers not set");
+    return _receiverStages;
+  }
+
+  @Deprecated
   public int getReceiverStageId() {
-    return _receiverStageId;
+    Preconditions.checkState(_receiverStages != null && 
!_receiverStages.isEmpty(), "Receivers not set");

Review Comment:
   Yep, there was naive error in PinotLogicalQueryPlanner. I've just fixed it 
in #1597f5b



##########
pinot-query-planner/src/main/java/org/apache/pinot/query/planner/plannode/MailboxSendNode.java:
##########
@@ -50,8 +55,50 @@ public MailboxSendNode(int stageId, DataSchema dataSchema, 
List<PlanNode> inputs
     _sort = sort;
   }
 
+  public MailboxSendNode(int stageId, DataSchema dataSchema, List<PlanNode> 
inputs,
+      int receiverStage, PinotRelExchangeType exchangeType,
+      RelDistribution.Type distributionType, @Nullable List<Integer> keys, 
boolean prePartitioned,
+      @Nullable List<RelFieldCollation> collations, boolean sort) {
+    this(stageId, dataSchema, inputs, toBitSet(receiverStage), exchangeType, 
distributionType, keys, prePartitioned,
+        collations, sort);
+  }
+
+  private static BitSet toBitSet(int receiverStage) {
+    BitSet bitSet = new BitSet(receiverStage + 1);
+    bitSet.set(receiverStage);
+    return bitSet;
+  }
+
+  public MailboxSendNode(int stageId, DataSchema dataSchema, List<PlanNode> 
inputs,
+      PinotRelExchangeType exchangeType, RelDistribution.Type 
distributionType, @Nullable List<Integer> keys,
+      boolean prePartitioned, @Nullable List<RelFieldCollation> collations, 
boolean sort) {
+    this(stageId, dataSchema, inputs, null, exchangeType, distributionType, 
keys, prePartitioned, collations, sort);
+  }
+
+  public BitSet getReceiverStages() {
+    Preconditions.checkState(_receiverStages != null && 
!_receiverStages.isEmpty(), "Receivers not set");
+    return _receiverStages;
+  }
+
+  @Deprecated
   public int getReceiverStageId() {
-    return _receiverStageId;
+    Preconditions.checkState(_receiverStages != null && 
!_receiverStages.isEmpty(), "Receivers not set");

Review Comment:
   Yep, there was naive error in PinotLogicalQueryPlanner. I've just fixed it 
in 1597f5b



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to