Jackie-Jiang commented on code in PR #15562:
URL: https://github.com/apache/pinot/pull/15562#discussion_r2054981900


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/exchange/SingletonExchange.java:
##########
@@ -38,9 +37,7 @@ class SingletonExchange extends BlockExchange {
   SingletonExchange(List<SendingMailbox> sendingMailboxes, BlockSplitter 
splitter,
       Function<List<SendingMailbox>, Integer> statsIndexChooser) {
     super(sendingMailboxes, splitter, statsIndexChooser);
-    Preconditions.checkArgument(
-        sendingMailboxes.size() == 1 && sendingMailboxes.get(0) instanceof 
InMemorySendingMailbox,
-        "Expect single InMemorySendingMailbox for SingletonExchange");
+    Preconditions.checkArgument(sendingMailboxes.size() == 1, "Expect single 
mailbox in Singleton Exchange");

Review Comment:
   Yeah I understand we are using `SingletonExchange` as `LocalExchange` right 
now, which is not correct. My concern is that this change is loosing the check, 
and could potentially allow bug where data is sending across servers.
   
   Do you think we can introduce a `LocalExchange` and modify the existing code 
to create that when `RelDistribution.Type` is `SINGLETON`? With your new code, 
we should be able to properly distinguish local (maybe never needed) vs 
singleton



-- 
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