You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/05/11 03:11:29 UTC

[GitHub] [iotdb] qmdx opened a new issue #3157: sessionPool.insertRecord type BOOLEAN metadata tree type TEXT

qmdx opened a new issue #3157:
URL: https://github.com/apache/iotdb/issues/3157


   **Describe the bug**
   type BOOLEAN metadata tree type TEXT
   
   
   **To Reproduce**
   
   ```
   api("org.apache.iotdb:iotdb-session:0.12.0")
   ```
   
   
   ```
     List<String> measurements = new ArrayList<>();
     List<TSDataType> types = new ArrayList<>();
     List<Object> values = new ArrayList<>();
     for (DatData datData : datDataList) {
         measurements.add(datData.getColumnName());
           //  Here is the string type . 
         Object data = datData.getData();
         if (data instanceof String) {
             types.add(TSDataType.TEXT);
         } else if (data instanceof Integer) {
             types.add(TSDataType.INT32);
         } else if (data instanceof Long) {
             types.add(TSDataType.INT64);
         } else if (data instanceof Float) {
             types.add(TSDataType.FLOAT);
         } else if (data instanceof Double) {
             types.add(TSDataType.DOUBLE);
         } else if (data instanceof Boolean) {
             types.add(TSDataType.BOOLEAN);
         } else {
             types.add(TSDataType.INT32);
         }
         values.add(data);
     }
   
     // error  type BOOLEAN metadata tree type TEXT
     this.sessionPool.insertRecord(datTimeSeries.getDeviceId(), datTimeSeries.createSeries(),
             measurements, types, values);
   ```
   
   It's normal to use another method
   
   ```
   this.sessionPool.insertRecord(datTimeSeries.getDeviceId(), datTimeSeries.createSeries(),
                   Arrays.asList(columnName), Arrays.asList(data));
   ```


-- 
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:
users@infra.apache.org



[GitHub] [iotdb] HTHou commented on issue #3157: sessionPool.insertRecord type BOOLEAN metadata tree type TEXT

Posted by GitBox <gi...@apache.org>.
HTHou commented on issue #3157:
URL: https://github.com/apache/iotdb/issues/3157#issuecomment-861226717


   We have some users who use the 0.11 client to insert data into 0.12 server meet the same problem. Please make sure you are using the same client version with server. 


-- 
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:
users@infra.apache.org



[GitHub] [iotdb] HTHou edited a comment on issue #3157: sessionPool.insertRecord type BOOLEAN metadata tree type TEXT

Posted by GitBox <gi...@apache.org>.
HTHou edited a comment on issue #3157:
URL: https://github.com/apache/iotdb/issues/3157#issuecomment-837876831


     // error  type BOOLEAN metadata tree type TEXT
     this.sessionPool.insertRecord(datTimeSeries.getDeviceId(), datTimeSeries.createSeries(),
             measurements, types, values);
   
   Hi, did you try to execute `show timeseries` to check the data types on server?
   I think the reason may be there is a timeseries created which should be BOOLEAN but be TEXT actually on server.


-- 
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:
users@infra.apache.org



[GitHub] [iotdb] HTHou commented on issue #3157: sessionPool.insertRecord type BOOLEAN metadata tree type TEXT

Posted by GitBox <gi...@apache.org>.
HTHou commented on issue #3157:
URL: https://github.com/apache/iotdb/issues/3157#issuecomment-837876831


     // error  type BOOLEAN metadata tree type TEXT
     this.sessionPool.insertRecord(datTimeSeries.getDeviceId(), datTimeSeries.createSeries(),
             measurements, types, values);
   
   Hi, did you try to execute `show timeseries` to check the data types in server?
   


-- 
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:
users@infra.apache.org



[GitHub] [iotdb] HTHou edited a comment on issue #3157: sessionPool.insertRecord type BOOLEAN metadata tree type TEXT

Posted by GitBox <gi...@apache.org>.
HTHou edited a comment on issue #3157:
URL: https://github.com/apache/iotdb/issues/3157#issuecomment-837876831


   > ```
   >   // error  type BOOLEAN metadata tree type TEXT
   >   this.sessionPool.insertRecord(datTimeSeries.getDeviceId(), datTimeSeries.createSeries(),
   >           measurements, types, values);
   > ```
   
   Hi, did you try to execute `show timeseries` to check the data types on server?
   I think the reason may be there is a timeseries created which should be BOOLEAN but be TEXT actually on server.


-- 
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:
users@infra.apache.org



[GitHub] [iotdb] github-actions[bot] commented on issue #3157: sessionPool.insertRecord type BOOLEAN metadata tree type TEXT

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #3157:
URL: https://github.com/apache/iotdb/issues/3157#issuecomment-837708714


   Hi, this is your first issue in IoTDB project. Thanks for your report. Welcome to join the community!


-- 
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:
users@infra.apache.org



[GitHub] [iotdb] HTHou closed issue #3157: sessionPool.insertRecord type BOOLEAN metadata tree type TEXT

Posted by GitBox <gi...@apache.org>.
HTHou closed issue #3157:
URL: https://github.com/apache/iotdb/issues/3157


   


-- 
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:
users@infra.apache.org