jackwener commented on code in PR #11222: URL: https://github.com/apache/doris/pull/11222#discussion_r932173805
########## fe/fe-core/src/main/java/org/apache/doris/nereids/properties/DistributionSpec.java: ########## @@ -21,52 +21,38 @@ import org.apache.doris.nereids.memo.GroupExpression; import org.apache.doris.nereids.trees.plans.GroupPlan; import org.apache.doris.nereids.trees.plans.physical.PhysicalDistribution; -import org.apache.doris.planner.DataPartition; import com.google.common.collect.Lists; /** * Spec of data distribution. + * GPORCA has more type in CDistributionSpec. */ -public class DistributionSpec { - - private DataPartition dataPartition; - - // TODO: why exist? - public DistributionSpec() { - } - - public DistributionSpec(DataPartition dataPartition) { - this.dataPartition = dataPartition; - } - +public abstract class DistributionSpec { /** * TODO: need read ORCA. * Whether other `DistributionSpec` is satisfied the current `DistributionSpec`. * * @param other another DistributionSpec. */ - public boolean meet(DistributionSpec other) { - return false; - } - - public DataPartition getDataPartition() { - return dataPartition; - } - - public void setDataPartition(DataPartition dataPartition) { - this.dataPartition = dataPartition; - } + public abstract boolean meet(DistributionSpec other); public GroupExpression addEnforcer(Group child) { PhysicalDistribution distribution = new PhysicalDistribution( - new DistributionSpec(dataPartition), child.getLogicalProperties(), new GroupPlan(child)); + this, + child.getLogicalProperties(), Review Comment: Add a todo -- 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...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org