You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2021/11/18 08:29:39 UTC

[GitHub] [calcite] xy2953396112 commented on a change in pull request #2604: [CALCITE-4883] The traitset of Exchange operator losses the distribution when externalizing Exchange operator from JSON

xy2953396112 commented on a change in pull request #2604:
URL: https://github.com/apache/calcite/pull/2604#discussion_r750374977



##########
File path: core/src/main/java/org/apache/calcite/rel/core/Exchange.java
##########
@@ -62,15 +62,15 @@ protected Exchange(RelOptCluster cluster, RelTraitSet traitSet, RelNode input,
     this.distribution = Objects.requireNonNull(distribution, "distribution");
 
     assert traitSet.containsIfApplicable(distribution)
-        : "traits=" + traitSet + ", distribution" + distribution;
+        : "traits=" + traitSet + ", distribution=" + distribution;
     assert distribution != RelDistributions.ANY;
   }
 
   /**
    * Creates an Exchange by parsing serialized output.
    */
   protected Exchange(RelInput input) {
-    this(input.getCluster(), input.getTraitSet(), input.getInput(),
+    this(input.getCluster(), input.getTraitSet().plus(input.getDistribution()), input.getInput(),

Review comment:
       Could you add a test? 




-- 
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-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org