use of com.facebook.presto.sql.planner.planPrinter.JsonRenderer.JsonPlanFragment in project presto by prestodb.
the class PlanPrinter method formatJsonFragmentList.
private static String formatJsonFragmentList(List<PlanFragment> fragments) {
ImmutableSortedMap.Builder<PlanFragmentId, JsonPlanFragment> fragmentJsonMap = ImmutableSortedMap.naturalOrder();
for (PlanFragment fragment : fragments) {
PlanFragmentId fragmentId = fragment.getId();
JsonPlanFragment jsonPlanFragment = new JsonPlanFragment(fragment.getJsonRepresentation().get());
fragmentJsonMap.put(fragmentId, jsonPlanFragment);
}
return new JsonRenderer().render(fragmentJsonMap.build());
}
Aggregations