This is an automated email from the ASF dual-hosted git repository. rong pushed a commit to branch select-into in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 48f80e6d7e9ab55ad61e4d388dec7fa8aee7cc35 Author: Steve Yurong Su <[email protected]> AuthorDate: Wed Jul 21 15:50:57 2021 +0800 make sure the number of source paths and the number of target paths should are the same --- .../org/apache/iotdb/db/qp/logical/crud/SelectIntoOperator.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/org/apache/iotdb/db/qp/logical/crud/SelectIntoOperator.java b/server/src/main/java/org/apache/iotdb/db/qp/logical/crud/SelectIntoOperator.java index 1859cef..7349a17 100644 --- a/server/src/main/java/org/apache/iotdb/db/qp/logical/crud/SelectIntoOperator.java +++ b/server/src/main/java/org/apache/iotdb/db/qp/logical/crud/SelectIntoOperator.java @@ -45,7 +45,12 @@ public class SelectIntoOperator extends Operator { @Override public PhysicalPlan generatePhysicalPlan(PhysicalGenerator generator) throws QueryProcessException { - return new SelectIntoPlan((QueryPlan) queryOperator.generatePhysicalPlan(generator), intoPaths); + QueryPlan queryPlan = (QueryPlan) queryOperator.generatePhysicalPlan(generator); + if (intoPaths.size() != queryPlan.getPaths().size()) { + throw new QueryProcessException( + "select into: the number of source paths and the number of target paths should be the same."); + } + return new SelectIntoPlan(queryPlan, intoPaths); } public void check() throws LogicalOperatorException {
