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_r357485540
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/core/Exchange.java
 ##########
 @@ -68,8 +68,7 @@ protected Exchange(RelOptCluster cluster, RelTraitSet 
traitSet, RelNode input,
    * Creates an Exchange by parsing serialized output.
    */
   public Exchange(RelInput input) {
 
 Review comment:
   May be not strongly related to this PR, in above `Exchange` constructor, the 
assertion is like below:
   ```
   assert traitSet.containsIfApplicable(distribution)
   ```
   It means that the assertion will be passed if `traitSet` dosn't contain the 
trait def of distribution.
   But I think distribution should always be part of Exchange traitset. Should 
it be `assert traitSet.contains(distribution)` ?

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