jinxing64 commented on a change in pull request #1642: [CALCITE-3583] Support 
serialized to json and deserialized from json for Exchange relation operator
URL: https://github.com/apache/calcite/pull/1642#discussion_r357486367
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/RelDistributions.java
 ##########
 @@ -80,6 +80,15 @@ public static RelDistribution range(Collection<? extends 
Number> numbers) {
     return RelDistributionTraitDef.INSTANCE.canonize(trait);
   }
 
+  /** Creates a distribution. */
+  public static RelDistribution distribution(
+      RelDistribution.Type type, List<Number> keys) {
+    ImmutableIntList list = ImmutableIntList.copyOf(keys);
+    RelDistributionImpl trait =
+        new RelDistributionImpl(type, list);
+    return RelDistributionTraitDef.INSTANCE.canonize(trait);
+  }
+
 
 Review comment:
   +1 for `Collection<? extends Number>`

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


With regards,
Apache Git Services

Reply via email to