public String text;
public String json;
public LogicalExplain(RelNode node, SqlExplainLevel level, QueryContext context) {
this.text = RelOptUtil.toString(node, level);
DrillImplementor implementor = new DrillImplementor(new DrillParseContext(), ResultMode.LOGICAL);
implementor.go( (DrillRel) node);
LogicalPlan plan = implementor.getPlan();
this.json = plan.unparse(context.getConfig());
}