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 2019/12/10 22:59:16 UTC

[GitHub] [calcite] julianhyde commented on a change in pull request #1642: [CALCITE-3583] Support serialized to json and deserialized from json for Exchange relation operator

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

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/externalize/RelJson.java
 ##########
 @@ -191,7 +191,10 @@ public RelFieldCollation toFieldCollation(Map<String, Object> map) {
   }
 
   public RelDistribution toDistribution(Object o) {
-    return RelDistributions.ANY; // TODO:
+    final Map map = (Map) o;
 
 Review comment:
   The style of RelJson (which I agree with) is to assume that objects are of the correct type, i.e. they match that produced by the corresponding toJson method (in this case `toJson(RelDistribution)`).
   
   I'd add javadoc for the `toDistribution` method describing the contract.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services