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/09/15 14:20:04 UTC

[GitHub] [iotdb] jun0315 opened a new pull request #3971: [IOTDB-1690] Fix align by device type cast error

jun0315 opened a new pull request #3971:
URL: https://github.com/apache/iotdb/pull/3971


   Use align by device function:
   
   select * from root.database.student(any similar sql) align by device
   
   Will print error:
   
   Msg: 500: [INTERNAL_SERVER_ERROR] Exception occurred: "select * from root.database.student align by device". executeStatement failed. org.apache.iotdb.db.metadata.mnode.EntityMNode cannot be cast to org.apache.iotdb.db.metadata.mnode.IMeasurementMNode
   
   
   


-- 
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] coveralls commented on pull request #3971: [IOTDB-1690] Fix align by device type cast error

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #3971:
URL: https://github.com/apache/iotdb/pull/3971#issuecomment-920108421


   
   [![Coverage Status](https://coveralls.io/builds/42895793/badge)](https://coveralls.io/builds/42895793)
   
   Coverage decreased (-0.003%) to 67.38% when pulling **ac826ed370faa24d7c7e6ec850c5ceb605874a0b on jun0315:fix_align_by_device_type_cast_error** into **45b3d6f8e3dc818cad15e9251897f45782aacec0 on apache:master**.
   


-- 
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] HTHou commented on pull request #3971: [IOTDB-1690] Fix align by device type cast error

Posted by GitBox <gi...@apache.org>.
HTHou commented on pull request #3971:
URL: https://github.com/apache/iotdb/pull/3971#issuecomment-920086253


   @zyk990424 Can you plz take a look?


-- 
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] coveralls edited a comment on pull request #3971: [IOTDB-1690] Fix align by device type cast error

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #3971:
URL: https://github.com/apache/iotdb/pull/3971#issuecomment-920108421


   
   [![Coverage Status](https://coveralls.io/builds/42897269/badge)](https://coveralls.io/builds/42897269)
   
   Coverage increased (+0.1%) to 67.495% when pulling **decc8edc88c7b613201f83bad048f6ae842872c5 on jun0315:fix_align_by_device_type_cast_error** into **45b3d6f8e3dc818cad15e9251897f45782aacec0 on apache:master**.
   


-- 
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] coveralls edited a comment on pull request #3971: [IOTDB-1690] Fix align by device type cast error

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #3971:
URL: https://github.com/apache/iotdb/pull/3971#issuecomment-920108421


   
   [![Coverage Status](https://coveralls.io/builds/42897348/badge)](https://coveralls.io/builds/42897348)
   
   Coverage decreased (-0.02%) to 67.36% when pulling **decc8edc88c7b613201f83bad048f6ae842872c5 on jun0315:fix_align_by_device_type_cast_error** into **45b3d6f8e3dc818cad15e9251897f45782aacec0 on apache:master**.
   


-- 
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] jun0315 commented on a change in pull request #3971: [IOTDB-1690] Fix align by device type cast error

Posted by GitBox <gi...@apache.org>.
jun0315 commented on a change in pull request #3971:
URL: https://github.com/apache/iotdb/pull/3971#discussion_r709285593



##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/MManager.java
##########
@@ -1241,8 +1241,10 @@ public IMNode getDeviceNodeWithAutoCreate(PartialPath path)
       Template template = node.getUpperTemplate();
 
       for (IMNode child : node.getChildren().values()) {
-        IMeasurementMNode measurementMNode = (IMeasurementMNode) child;
-        res.add(measurementMNode.getSchema());
+        if (child instanceof IMeasurementMNode) {

Review comment:
       Thanks for your reply!
   I have changed to is measurement function.
   
   




-- 
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] zyk990424 commented on a change in pull request #3971: [IOTDB-1690] Fix align by device type cast error

Posted by GitBox <gi...@apache.org>.
zyk990424 commented on a change in pull request #3971:
URL: https://github.com/apache/iotdb/pull/3971#discussion_r709280614



##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/MManager.java
##########
@@ -1241,8 +1241,10 @@ public IMNode getDeviceNodeWithAutoCreate(PartialPath path)
       Template template = node.getUpperTemplate();
 
       for (IMNode child : node.getChildren().values()) {
-        IMeasurementMNode measurementMNode = (IMeasurementMNode) child;
-        res.add(measurementMNode.getSchema());
+        if (child instanceof IMeasurementMNode) {

Review comment:
       It's better use override method child.isMeasurement.
   Java instansof violates OO design and program.




-- 
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] HTHou merged pull request #3971: [IOTDB-1690] Fix align by device type cast error

Posted by GitBox <gi...@apache.org>.
HTHou merged pull request #3971:
URL: https://github.com/apache/iotdb/pull/3971


   


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