ankitsultana commented on code in PR #15371: URL: https://github.com/apache/pinot/pull/15371#discussion_r2025364625
########## pinot-query-planner/src/main/java/org/apache/pinot/query/planner/physical/v2/ExchangeStrategy.java: ########## @@ -0,0 +1,67 @@ +/** + * 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.physical.v2; + +/** + * Defines how data is transferred across an Exchange. + */ +public enum ExchangeStrategy { + /** + * There's a single stream in the receiver, so each stream in the sender sends data to the same. + */ + SINGLETON_EXCHANGE, + /** + * stream-ID X sends data to stream-ID X. This cannot be modeled by PARTITIONING_EXCHANGE because the fan-out for + * this type of exchange is 1:1. + */ + IDENTITY_EXCHANGE, + /** + * Each stream will partition the outgoing stream based on a set of keys and a hash function. + * Fanout for this type of exchange is 1:all. + */ + PARTITIONING_EXCHANGE, + /** + * 1-to-1 but the exchange is a permutation of stream-ids. + */ + PERMUTATION_EXCHANGE, Review Comment: Good question. I had added it for completeness but I don't see a use-case for it right now. Removed. -- 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