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 2020/08/31 02:33:11 UTC

[GitHub] [incubator-iotdb] wyh-ztf opened a new pull request #1662: IOTDB-837

wyh-ztf opened a new pull request #1662:
URL: https://github.com/apache/incubator-iotdb/pull/1662


   ArrayIndexOutOfBoundsException if the measurementId size is not consistent with the value size


----------------------------------------------------------------
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] [incubator-iotdb] wyh-ztf commented on a change in pull request #1662: IOTDB-837:ArrayIndexOutOfBoundsException if the measurementId size is not consistent with the value size

Posted by GitBox <gi...@apache.org>.
wyh-ztf commented on a change in pull request #1662:
URL: https://github.com/apache/incubator-iotdb/pull/1662#discussion_r479878422



##########
File path: server/src/main/java/org/apache/iotdb/db/qp/strategy/PhysicalGenerator.java
##########
@@ -176,6 +176,13 @@ public PhysicalPlan transformToPhysicalPlan(Operator operator) throws QueryProce
               "For Insert command, cannot specified more than one seriesPath: " + paths);
         }
 
+        if (insert.getMeasurementList().length != insert.getValueList().length) {
+          throw new ArrayIndexOutOfBoundsException(

Review comment:
       Thank you for your opinion. I will revise it




----------------------------------------------------------------
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] [incubator-iotdb] wyh-ztf commented on pull request #1662: IOTDB-837:ArrayIndexOutOfBoundsException if the measurementId size is not consistent with the value size

Posted by GitBox <gi...@apache.org>.
wyh-ztf commented on pull request #1662:
URL: https://github.com/apache/incubator-iotdb/pull/1662#issuecomment-684663710


   > I forget one thing. For each bug fix, please add a test to verify it
   
   ok,i will add a test to verify it


----------------------------------------------------------------
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] [incubator-iotdb] qiaojialin merged pull request #1662: [IOTDB-837] ArrayIndexOutOfBoundsException if the measurementId size is not consistent with the value size

Posted by GitBox <gi...@apache.org>.
qiaojialin merged pull request #1662:
URL: https://github.com/apache/incubator-iotdb/pull/1662


   


----------------------------------------------------------------
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] [incubator-iotdb] wyh-ztf commented on pull request #1662: [IOTDB-837] ArrayIndexOutOfBoundsException if the measurementId size is not consistent with the value size

Posted by GitBox <gi...@apache.org>.
wyh-ztf commented on pull request #1662:
URL: https://github.com/apache/incubator-iotdb/pull/1662#issuecomment-684837337


   > Hi, we usually use square brackets [] around the issue number in the title
   
   OK, I'll pay attention next time. Thanks for your help


----------------------------------------------------------------
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] [incubator-iotdb] qiaojialin commented on pull request #1662: [IOTDB-837] ArrayIndexOutOfBoundsException if the measurementId size is not consistent with the value size

Posted by GitBox <gi...@apache.org>.
qiaojialin commented on pull request #1662:
URL: https://github.com/apache/incubator-iotdb/pull/1662#issuecomment-684814987


   Hi, we usually use square brackets [] around the issue number in the title


----------------------------------------------------------------
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] [incubator-iotdb] qiaojialin commented on a change in pull request #1662: IOTDB-837:ArrayIndexOutOfBoundsException if the measurementId size is not consistent with the value size

Posted by GitBox <gi...@apache.org>.
qiaojialin commented on a change in pull request #1662:
URL: https://github.com/apache/incubator-iotdb/pull/1662#discussion_r479866662



##########
File path: server/src/main/java/org/apache/iotdb/db/qp/strategy/PhysicalGenerator.java
##########
@@ -176,6 +176,13 @@ public PhysicalPlan transformToPhysicalPlan(Operator operator) throws QueryProce
               "For Insert command, cannot specified more than one seriesPath: " + paths);
         }
 
+        if (insert.getMeasurementList().length != insert.getValueList().length) {
+          throw new ArrayIndexOutOfBoundsException(

Review comment:
       You could throw an SQLParserException.

##########
File path: server/src/main/java/org/apache/iotdb/db/qp/strategy/PhysicalGenerator.java
##########
@@ -176,6 +176,13 @@ public PhysicalPlan transformToPhysicalPlan(Operator operator) throws QueryProce
               "For Insert command, cannot specified more than one seriesPath: " + paths);
         }

Review comment:
       This check could also be removed. I do not know how to trigger this. The sql parser should have already checked.




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