未验证 提交 e19ad057 编写于 作者: S Steve Yurong Su 提交者: GitHub

[IOTDB-1412] Unclear exception message thrown when executing empty InsertTabletPlan (#3296)

上级 d381f979
......@@ -1179,6 +1179,9 @@ public class PlanExecutor implements IPlanExecutor {
@Override
public void insert(InsertRowsOfOneDevicePlan insertRowsOfOneDevicePlan)
throws QueryProcessException {
if (insertRowsOfOneDevicePlan.getRowPlans().length == 0) {
return;
}
try {
for (InsertRowPlan plan : insertRowsOfOneDevicePlan.getRowPlans()) {
plan.setMeasurementMNodes(new MeasurementMNode[plan.getMeasurements().length]);
......@@ -1302,6 +1305,9 @@ public class PlanExecutor implements IPlanExecutor {
@Override
public void insertTablet(InsertTabletPlan insertTabletPlan) throws QueryProcessException {
if (insertTabletPlan.getRowCount() == 0) {
return;
}
try {
insertTabletPlan.setMeasurementMNodes(
new MeasurementMNode[insertTabletPlan.getMeasurements().length]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册