aokolnychyi commented on a change in pull request #30706: URL: https://github.com/apache/spark/pull/30706#discussion_r543249337
########## File path: sql/catalyst/src/main/java/org/apache/spark/sql/connector/distributions/ClusteredDistribution.java ########## @@ -0,0 +1,35 @@ +/* + * 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.spark.sql.connector.distributions; + +import org.apache.spark.annotation.Experimental; +import org.apache.spark.sql.connector.expressions.Expression; + +/** + * A distribution where tuples that share the same values for clustering expressions are co-located + * in the same partition. + * + * @since 3.2.0 + */ +@Experimental +public interface ClusteredDistribution extends Distribution { Review comment: We have started this discussion in comments to the original PR a bit. Some background [here](https://github.com/apache/spark/pull/29066#issuecomment-735558685) and [here](https://github.com/apache/spark/pull/29066#issuecomment-736073015). Overall, there are two options: break the API now and use new interfaces instead of the old ones in other places or evolve these two separately for a while and replace the read side once we have a clear plan for bucketed joins. My first idea was to break the API and migrate to the new interfaces like suggested by @cloud-fan as that seems inevitable at some point. However, there were a couple of good points mentioned by reviewers on the original PR and I am now inclined to evolve these separately for a while until we know what changes will be required to support bucketed tables. I would like to avoid breaking the read side twice if possible. That said, I don't feel strongly here and each option has its own benefits and drawbacks. I'll be fine with either one. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
