You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2020/05/18 10:42:55 UTC
[incubator-iotdb] branch add_parameter_check created (now 3b99ffe)
This is an automated email from the ASF dual-hosted git repository.
qiaojialin pushed a change to branch add_parameter_check
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git.
at 3b99ffe add parameter check in session.insertInBatch
This branch includes the following new commits:
new 3b99ffe add parameter check in session.insertInBatch
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[incubator-iotdb] 01/01: add parameter check in
session.insertInBatch
Posted by qi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
qiaojialin pushed a commit to branch add_parameter_check
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
commit 3b99ffeab2c49c963ae3a455957395fee2d9c906
Author: qiaojialin <64...@qq.com>
AuthorDate: Mon May 18 18:42:36 2020 +0800
add parameter check in session.insertInBatch
---
session/src/main/java/org/apache/iotdb/session/Session.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/session/src/main/java/org/apache/iotdb/session/Session.java b/session/src/main/java/org/apache/iotdb/session/Session.java
index 5f93e00..2aa1559 100644
--- a/session/src/main/java/org/apache/iotdb/session/Session.java
+++ b/session/src/main/java/org/apache/iotdb/session/Session.java
@@ -194,6 +194,14 @@ public class Session {
throw new IllegalArgumentException(
"deviceIds, times, measurementsList and valuesList's size should be equal");
}
+ for (int i = 0; i < measurementsList.size(); i++) {
+ List<String> measurements = measurementsList.get(i);
+ List<String> values = valuesList.get(i);
+ if (measurements.size() != values.size()) {
+ throw new IllegalArgumentException(
+ "each measurements size and values size should be equal");
+ }
+ }
TSInsertInBatchReq request = new TSInsertInBatchReq();
request.setDeviceIds(deviceIds);