samperson1997 commented on a change in pull request #1298:
URL: https://github.com/apache/incubator-iotdb/pull/1298#discussion_r433264844



##########
File path: 
server/src/test/java/org/apache/iotdb/db/integration/IoTDBSimpleQueryIT.java
##########
@@ -169,6 +172,34 @@ public void testFirstOverlappedPageFiltered() throws 
SQLException, ClassNotFound
   }
 
 
+  @Test
+  public void testPartialInsertion() throws SQLException, 
ClassNotFoundException {
+    Class.forName(Config.JDBC_DRIVER_NAME);
+    try(Connection connection = DriverManager
+        .getConnection(Config.IOTDB_URL_PREFIX + "127.0.0.1:6667/",
+            "root", "root");
+        Statement statement = connection.createStatement()){
+      statement.execute("SET STORAGE GROUP TO root.sg1");
+      statement.execute("CREATE TIMESERIES root.sg1.d0.s0 WITH 
DATATYPE=INT32,ENCODING=PLAIN");
+      statement.execute("CREATE TIMESERIES root.sg1.d0.s1 WITH 
DATATYPE=INT32,ENCODING=PLAIN");
+
+      // seq chunk : [1,10]
+      try {
+        statement.execute("INSERT INTO root.sg1.d0(timestamp, s0, s1) VALUES 
(1, 1, 2.2)");
+        fail();
+      } catch (IoTDBSQLException e) {
+        assertTrue(e.getMessage().contains("s1"));
+      }
+
+      ResultSet resultSet = statement.executeQuery("select s0, s1 from 
root.sg1.d0");
+
+      while(resultSet.next()) {
+        assertEquals(resultSet.getInt("root.sg1.d0.s0"), 1);
+        assertEquals(resultSet.getString("root.sg1.d0.s1"), null);

Review comment:
       ```suggestion
           assertEquals(1, resultSet.getInt("root.sg1.d0.s0"));
           assertEquals(null, resultSet.getString("root.sg1.d0.s1"));
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to