未验证 提交 eee581e1 编写于 作者: B Beyyes 提交者: GitHub

Perfect plan graph for last query scan node

上级 eb43b490
......@@ -60,6 +60,7 @@ import org.apache.iotdb.db.queryengine.plan.planner.plan.parameter.IntoPathDescr
import org.apache.iotdb.tsfile.utils.Pair;
import org.apache.commons.lang3.Validate;
import org.eclipse.jetty.util.StringUtil;
import java.util.ArrayList;
import java.util.HashMap;
......@@ -384,6 +385,9 @@ public class PlanGraphPrinter extends PlanVisitor<List<String>, PlanGraphPrinter
List<String> boxValue = new ArrayList<>();
boxValue.add(String.format("LastQueryScan-%s", node.getPlanNodeId().getId()));
boxValue.add(String.format("Series: %s", node.getSeriesPath()));
if (StringUtil.isNotBlank(node.getOutputViewPath())) {
boxValue.add(String.format("ViewPath: %s", node.getOutputViewPath()));
}
boxValue.add(printRegion(node.getRegionReplicaSet()));
return render(node, boxValue, context);
}
......@@ -397,6 +401,9 @@ public class PlanGraphPrinter extends PlanVisitor<List<String>, PlanGraphPrinter
String.format(
"Series: %s%s",
node.getSeriesPath().getDevice(), node.getSeriesPath().getMeasurementList()));
if (StringUtil.isNotBlank(node.getOutputViewPath())) {
boxValue.add(String.format("ViewPath: %s", node.getOutputViewPath()));
}
boxValue.add(printRegion(node.getRegionReplicaSet()));
return render(node, boxValue, context);
}
......
......@@ -32,6 +32,7 @@ import org.apache.iotdb.tsfile.read.filter.basic.Filter;
import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils;
import com.google.common.collect.ImmutableList;
import org.eclipse.jetty.util.StringUtil;
import java.io.DataOutputStream;
import java.io.IOException;
......@@ -158,11 +159,20 @@ public class AlignedLastQueryScanNode extends LastSeriesSourceNode {
@Override
public String toString() {
return String.format(
"AlignedLastQueryScanNode-%s:[SeriesPath: %s, DataRegion: %s]",
this.getPlanNodeId(),
this.getSeriesPath().getFormattedString(),
PlanNodeUtil.printRegionReplicaSet(this.getRegionReplicaSet()));
if (StringUtil.isNotBlank(outputViewPath)) {
return String.format(
"AlignedLastQueryScanNode-%s:[SeriesPath: %s, ViewPath: %s, DataRegion: %s]",
this.getPlanNodeId(),
this.getSeriesPath().getFormattedString(),
this.getOutputViewPath(),
PlanNodeUtil.printRegionReplicaSet(this.getRegionReplicaSet()));
} else {
return String.format(
"AlignedLastQueryScanNode-%s:[SeriesPath: %s, DataRegion: %s]",
this.getPlanNodeId(),
this.getSeriesPath().getFormattedString(),
PlanNodeUtil.printRegionReplicaSet(this.getRegionReplicaSet()));
}
}
@Override
......
......@@ -32,6 +32,7 @@ import org.apache.iotdb.tsfile.read.filter.basic.Filter;
import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils;
import com.google.common.collect.ImmutableList;
import org.eclipse.jetty.util.StringUtil;
import java.io.DataOutputStream;
import java.io.IOException;
......@@ -164,11 +165,20 @@ public class LastQueryScanNode extends LastSeriesSourceNode {
@Override
public String toString() {
return String.format(
"LastQueryScanNode-%s:[SeriesPath: %s, DataRegion: %s]",
this.getPlanNodeId(),
this.getSeriesPath(),
PlanNodeUtil.printRegionReplicaSet(getRegionReplicaSet()));
if (StringUtil.isNotBlank(outputViewPath)) {
return String.format(
"LastQueryScanNode-%s:[SeriesPath: %s, ViewPath: %s, DataRegion: %s]",
this.getPlanNodeId(),
this.getSeriesPath(),
this.getOutputViewPath(),
PlanNodeUtil.printRegionReplicaSet(getRegionReplicaSet()));
} else {
return String.format(
"LastQueryScanNode-%s:[SeriesPath: %s, DataRegion: %s]",
this.getPlanNodeId(),
this.getSeriesPath(),
PlanNodeUtil.printRegionReplicaSet(getRegionReplicaSet()));
}
}
@Override
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册