walterddr commented on code in PR #10730: URL: https://github.com/apache/pinot/pull/10730#discussion_r1186745961
########## pinot-query-planner/src/main/java/org/apache/pinot/query/planner/logical/ExchangeNodeSplitterVisitor.java: ########## @@ -0,0 +1,168 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.pinot.query.planner.logical; + +import java.util.List; +import org.apache.calcite.rel.RelDistribution; +import org.apache.pinot.query.planner.partitioning.FieldSelectionKeySelector; +import org.apache.pinot.query.planner.partitioning.KeySelector; +import org.apache.pinot.query.planner.stage.AggregateNode; +import org.apache.pinot.query.planner.stage.ExchangeNode; +import org.apache.pinot.query.planner.stage.FilterNode; +import org.apache.pinot.query.planner.stage.JoinNode; +import org.apache.pinot.query.planner.stage.MailboxReceiveNode; +import org.apache.pinot.query.planner.stage.MailboxSendNode; +import org.apache.pinot.query.planner.stage.ProjectNode; +import org.apache.pinot.query.planner.stage.SetOpNode; +import org.apache.pinot.query.planner.stage.SortNode; +import org.apache.pinot.query.planner.stage.StageNode; +import org.apache.pinot.query.planner.stage.StageNodeVisitor; +import org.apache.pinot.query.planner.stage.TableScanNode; +import org.apache.pinot.query.planner.stage.ValueNode; +import org.apache.pinot.query.planner.stage.WindowNode; + + +public class ExchangeNodeSplitterVisitor implements StageNodeVisitor<StageNode, Void> { Review Comment: are we planning the make the exchange node splitter more generic going forward? cuz. 1. if we were to support more complex logic such as pipeline breaker, then this API seems not enough to indicate that (as it only can split into MailboxSend/ReceiveNode; - are we planning to support other type of split going forward? if so what would that be? such as subquery, etc) 2. if we decided to add another visitor to support other type of exchange that will not be converted into mailbox send/receive, then the logic should be merged with StageAssigner --> b/c the moment we do exchange split is the same moment we make decision to assign stage IDs. Let's make sure we are clear on what's the hierarch. us the example of subquery execution are we abstracting into: 1. convert exchange into subqueries and attach subqueryID 2. convert the rest of the exchanges into mailboxes + attach stageIDs; 3. convert the rest of the exchanges into some other abstraction. or 1. convert exchanges into subquery node and mailbox nodes (and some other nodes) 2. visit and assign subqueryID and stageID (and some other nodes) -- 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]
