qiaojialin opened a new issue #2179:
URL: https://github.com/apache/iotdb/issues/2179


   `session = new Session("127.0.0.1", 6667, "root", "root");
       session.open();
   
       List<MeasurementSchema> schemaList = new ArrayList<>();
       schemaList.add(new MeasurementSchema("s1", TSDataType.INT64));
       schemaList.add(new MeasurementSchema("s2", TSDataType.DOUBLE));
       schemaList.add(new MeasurementSchema("s3", TSDataType.TEXT));
   
       Tablet tablet = new Tablet("root.sg.d", schemaList, 100);
   
       long timestamp = System.currentTimeMillis();
   
       for (long row = 0; row < 10; row++) {
         int rowIndex = tablet.rowSize++;
         tablet.addTimestamp(rowIndex, timestamp);
         tablet.addValue("s1", rowIndex, 1L);
         tablet.addValue("s2", rowIndex, 1D);
         tablet.addValue("s3", rowIndex, new Binary("1"));
         if (tablet.rowSize == tablet.getMaxRowNumber()) {
           session.insertTablet(tablet, true);
           tablet.reset();
         }
         timestamp++;
       }
   
       if (tablet.rowSize != 0) {
         session.insertTablet(tablet);
         tablet.reset();
       }`
   
   Then, you will get a NullPointerException


----------------------------------------------------------------
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:
[email protected]


Reply via email to