walterddr commented on code in PR #10779: URL: https://github.com/apache/pinot/pull/10779#discussion_r1207495051
########## pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/plan/server/ServerRequestPlanVisitor.java: ########## @@ -0,0 +1,189 @@ +/** + * 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.runtime.plan.server; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; +import org.apache.pinot.common.datablock.DataBlock; +import org.apache.pinot.common.request.DataSource; +import org.apache.pinot.common.utils.DataSchema; +import org.apache.pinot.common.utils.request.RequestUtils; +import org.apache.pinot.query.parser.CalciteRexExpressionParser; +import org.apache.pinot.query.planner.plannode.AggregateNode; +import org.apache.pinot.query.planner.plannode.ExchangeNode; +import org.apache.pinot.query.planner.plannode.FilterNode; +import org.apache.pinot.query.planner.plannode.JoinNode; +import org.apache.pinot.query.planner.plannode.MailboxReceiveNode; +import org.apache.pinot.query.planner.plannode.MailboxSendNode; +import org.apache.pinot.query.planner.plannode.PlanNode; +import org.apache.pinot.query.planner.plannode.PlanNodeVisitor; +import org.apache.pinot.query.planner.plannode.ProjectNode; +import org.apache.pinot.query.planner.plannode.SetOpNode; +import org.apache.pinot.query.planner.plannode.SortNode; +import org.apache.pinot.query.planner.plannode.TableScanNode; +import org.apache.pinot.query.planner.plannode.ValueNode; +import org.apache.pinot.query.planner.plannode.WindowNode; +import org.apache.pinot.query.runtime.blocks.TransferableBlock; +import org.apache.pinot.spi.utils.builder.TableNameBuilder; + + +/** + * Plan visitor for direct leaf-stage server request. + * + * This should be merged with logics in {@link org.apache.pinot.core.plan.maker.InstancePlanMakerImplV2} in the future + * to directly produce operator chain. + * + * As of now, the reason why we use the plan visitor for server request is for additional support such as dynamic + * filtering and other auxiliary functionalities. + */ +public class ServerRequestPlanVisitor implements PlanNodeVisitor<Void, ServerPlanRequestContext> { + private static final ServerRequestPlanVisitor INSTANCE = new ServerRequestPlanVisitor(); + + static void walkStageNode(PlanNode node, ServerPlanRequestContext context) { + node.visit(INSTANCE, context); + } Review Comment: done. catch all added -- 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