morrySnow commented on code in PR #11604:
URL: https://github.com/apache/doris/pull/11604#discussion_r941964427


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/properties/PhysicalProperties.java:
##########
@@ -17,35 +17,47 @@
 
 package org.apache.doris.nereids.properties;
 
+import java.util.Objects;
+
 /**
  * Physical properties used in cascades.
- * TODO(wj): Do we need to `PhysicalPropertySpec` Interface like NoisePage?
  */
 public class PhysicalProperties {
+
+    public static PhysicalProperties ANY = new PhysicalProperties();
+
+    public static PhysicalProperties REPLICATED = new 
PhysicalProperties(DistributionSpecReplicated.INSTANCE);
+
+    public static PhysicalProperties GATHER = new 
PhysicalProperties(DistributionSpecGather.INSTANCE);
+
     private final OrderSpec orderSpec;
 
     private final DistributionSpec distributionSpec;
 
-    public PhysicalProperties() {
+    private PhysicalProperties() {
         this.orderSpec = new OrderSpec();
-        this.distributionSpec = DistributionSpecAny.getInstance();
+        this.distributionSpec = DistributionSpecAny.INSTANCE;
     }
 
-    public PhysicalProperties(DistributionSpec distributionSpec) {
+    private PhysicalProperties(DistributionSpec distributionSpec) {
         this.distributionSpec = distributionSpec;
         this.orderSpec = new OrderSpec();
     }
 
     public PhysicalProperties(OrderSpec orderSpec) {
         this.orderSpec = orderSpec;
-        this.distributionSpec = DistributionSpecAny.getInstance();
+        this.distributionSpec = DistributionSpecAny.INSTANCE;
     }
 
     public PhysicalProperties(DistributionSpec distributionSpec, OrderSpec 
orderSpec) {
         this.distributionSpec = distributionSpec;
         this.orderSpec = orderSpec;
     }
 
+    public static PhysicalProperties createHash(DistributionSpec 
distributionSpec) {

Review Comment:
   this function name is `createHash`, so i think the parameter should be 
`DistributionSpecHash`



-- 
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

Reply via email to