kasakrisz commented on a change in pull request #1868: [CALCITE-3867] Support 
RelDistribution json serialization
URL: https://github.com/apache/calcite/pull/1868#discussion_r396997511
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/externalize/RelJson.java
 ##########
 @@ -190,8 +193,35 @@ public RelFieldCollation toFieldCollation(Map<String, 
Object> map) {
     return new RelFieldCollation(field, direction, nullDirection);
   }
 
-  public RelDistribution toDistribution(Object o) {
-    return RelDistributions.ANY; // TODO:
+  public RelDistribution toDistribution(Map<String, Object> map) {
+    final RelDistribution.Type type =
 
 Review comment:
   In Apache Hive there is a command `EXPLAIN FORMATTED <query>`: it prints out 
the json representation of the plan generated by Calcite.
   I am working on an implementation of enabling Calcite planner in Hive when 
queries has `SORT BY` clause. `SORT BY` is translated to `SortExchange` which 
has `RelDistribution` and the command I mentioned above failed with 
serialization exception.
   This change is part of a bigger one: 
https://issues.apache.org/jira/browse/HIVE-22785

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


With regards,
Apache Git Services

Reply via email to