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/11/23 02:37:48 UTC

[GitHub] [iotdb] ents1008 opened a new issue #4446: 当java接口insertRecord() measurement含"." 时 将无法使用sql指定查询该measurement的数据

ents1008 opened a new issue #4446:
URL: https://github.com/apache/iotdb/issues/4446


   例如
   先插入
   private static Session session = new Session("127.0.0.1",6667,"root","root");
       public static void insertRecord(String driveId,long time,List<String> measurements,List<String> values) throws IoTDBConnectionException, StatementExecutionException {
           session.open();
           session.insertRecord(driveId,time,measurements,values);
           session.close();
       }
       public static void main(String[] args) throws Exception {
           while (true) {
               List<String> measurements = new ArrayList<>();
               List<String> values = new ArrayList<>();
               Map<String, String> data = new HashMap<>();
               Random random = new Random();
               data.put("TL_JS06.R_50NeckTemp2", String.valueOf(10 * random.nextFloat()));
               data.put("R_50NeckTemp3", String.valueOf(10 * random.nextFloat()));
               for (String tag : data.keySet()) {
                   measurements.add(tag);
                   values.add(data.get(tag));
               }
               IotDbSessionUtils.insertRecord("root.test.SD-T-JS006", new Date().getTime(), measurements, values);
               Thread.sleep(100);
           }
       }
   后查询 1 无数据, 2 有数据
   select count(TL_JS06.R_50NeckTemp2),LAST_VALUE(TL_JS06.R_50NeckTemp2)  from root.test.SD-T-JS006 group by ([2021-11-22 17:45:00, 2021-11-22 17:47:00), 2400ms)
   
   select count(R_50NeckTemp3),LAST_VALUE(R_50NeckTemp3)  from root.test.SD-T-JS006 group by ([2021-11-22 17:45:00, 2021-11-22 17:47:00), 2400ms)
   但使用select * from  root.test.SD-T-JS006 即可查到数据


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

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



[GitHub] [iotdb] github-actions[bot] commented on issue #4446: 当java接口insertRecord() measurement含"." 时 将无法使用sql指定查询该measurement的数据

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


   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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

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



[GitHub] [iotdb] jixuan1989 commented on issue #4446: 当java接口insertRecord() measurement含"." 时 将无法使用sql指定查询该measurement的数据

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


   You must point out which version you are using.
   
   from v0.12 (I checked v0.12.2 and v0.12.3) on, iotdb will check the value of measurements and reject such requests:
   
   ```
   Exception in thread "main" org.apache.iotdb.rpc.StatementExecutionException: 313: failed to insert measurements [TL_JS06.R_50NeckTemp2] caused by TL_JS06.R_50NeckTemp2 is an illegal measurementId
   	at org.apache.iotdb.rpc.RpcUtils.verifySuccess(RpcUtils.java:85)
   	at org.apache.iotdb.rpc.RpcUtils.verifySuccessWithRedirection(RpcUtils.java:91)
   	at org.apache.iotdb.session.SessionConnection.insertRecord(SessionConnection.java:485)
   	at org.apache.iotdb.session.Session.insertRecord(Session.java:754)
   	at org.apache.iotdb.session.Session.insertRecord(Session.java:937)
   	at org.apache.iotdb.SessionExample.insertRecord(SessionExample.java:41)
   	at org.apache.iotdb.SessionExample.main(SessionExample.java:57)
   ```
   
   But the server-side has too detailed log, and this case will be fixed in https://issues.apache.org/jira/browse/IOTDB-2055
   


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

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



[GitHub] [iotdb] ents1008 closed issue #4446: 当java接口insertRecord() measurement含"." 时 将无法使用sql指定查询该measurement的数据

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


   


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

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