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/18 11:14:36 UTC

[GitHub] [iotdb] haimeiguo opened a new pull request #3220: jdbc - get col type bug

haimeiguo opened a new pull request #3220:
URL: https://github.com/apache/iotdb/pull/3220


   JDBC getColumnType array out of index exception
   ![image](https://user-images.githubusercontent.com/68632589/118641803-2fbe0500-b80d-11eb-8935-9453b4baa0ef.png)
   


-- 
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] samperson1997 commented on a change in pull request #3220: jdbc - get col type bug

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



##########
File path: session/src/test/java/org/apache/iotdb/session/IoTDBSessionSimpleIT.java
##########
@@ -665,7 +665,7 @@ private void checkResult(Session session)
           "root.sg.d1.s2"
         });
     Assert.assertArrayEquals(
-        dataSet.getColumnTypes().toArray(new TSDataType[0]),
+        dataSet.getColumnTypes().toArray(new String[0]),
         new TSDataType[] {
           TSDataType.INT64,
           TSDataType.INT64,

Review comment:
       Hi, I wonder whether this change is correct, since the class is `TSDataType` and `String` separately.
   I got this failure when I run tests in `IoTDBSessionSimpleIT.java`:
   ![20431622707611_ pic](https://user-images.githubusercontent.com/19167280/120614520-e7981700-c489-11eb-89ed-11b61a552912.jpg)
   

##########
File path: session/src/test/java/org/apache/iotdb/session/IoTDBSessionSimpleIT.java
##########
@@ -665,7 +665,7 @@ private void checkResult(Session session)
           "root.sg.d1.s2"
         });
     Assert.assertArrayEquals(
-        dataSet.getColumnTypes().toArray(new TSDataType[0]),
+        dataSet.getColumnTypes().toArray(new String[0]),
         new TSDataType[] {
           TSDataType.INT64,
           TSDataType.INT64,

Review comment:
       After I changed the codes like this:
   ```
   Assert.assertArrayEquals(
           dataSet.getColumnTypes().toArray(new String[0]),
           new String[] {
             TSDataType.INT64.toString(),
             TSDataType.INT64.toString(),
             TSDataType.FLOAT.toString(),
             TSDataType.BOOLEAN.toString(),
             TSDataType.INT32.toString(),
             TSDataType.INT32.toString()
           });
   ```
   the tests would be passed




-- 
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] samperson1997 commented on a change in pull request #3220: jdbc - get col type bug

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



##########
File path: session/src/test/java/org/apache/iotdb/session/IoTDBSessionSimpleIT.java
##########
@@ -665,7 +665,7 @@ private void checkResult(Session session)
           "root.sg.d1.s2"
         });
     Assert.assertArrayEquals(
-        dataSet.getColumnTypes().toArray(new TSDataType[0]),
+        dataSet.getColumnTypes().toArray(new String[0]),
         new TSDataType[] {
           TSDataType.INT64,
           TSDataType.INT64,

Review comment:
       Hi, I wonder whether this change is correct, since the class is `TSDataType` and `String` separately.
   I got this failure when I run tests in `IoTDBSessionSimpleIT.java`:
   ![20431622707611_ pic](https://user-images.githubusercontent.com/19167280/120614520-e7981700-c489-11eb-89ed-11b61a552912.jpg)
   




-- 
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] samperson1997 commented on a change in pull request #3220: jdbc - get col type bug

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



##########
File path: session/src/test/java/org/apache/iotdb/session/IoTDBSessionSimpleIT.java
##########
@@ -665,7 +665,7 @@ private void checkResult(Session session)
           "root.sg.d1.s2"
         });
     Assert.assertArrayEquals(
-        dataSet.getColumnTypes().toArray(new TSDataType[0]),
+        dataSet.getColumnTypes().toArray(new String[0]),
         new TSDataType[] {
           TSDataType.INT64,
           TSDataType.INT64,

Review comment:
       After I changed the codes like this:
   ```
   Assert.assertArrayEquals(
           dataSet.getColumnTypes().toArray(new String[0]),
           new String[] {
             TSDataType.INT64.toString(),
             TSDataType.INT64.toString(),
             TSDataType.FLOAT.toString(),
             TSDataType.BOOLEAN.toString(),
             TSDataType.INT32.toString(),
             TSDataType.INT32.toString()
           });
   ```
   the tests would be passed




-- 
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] mychaow commented on pull request #3220: jdbc - get col type bug

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


   Please cherry-pick to rel/0.12.


-- 
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] mychaow commented on pull request #3220: jdbc - get col type bug

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


   There are some tests fail, please 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.

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



[GitHub] [iotdb] HTHou commented on pull request #3220: jdbc - get col type bug

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


   Spotless....


-- 
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] mychaow merged pull request #3220: jdbc - get col type bug

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


   


-- 
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] mychaow commented on a change in pull request #3220: jdbc - get col type bug

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



##########
File path: jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBResultMetadata.java
##########
@@ -35,6 +37,21 @@ public IoTDBResultMetadata(
     this.columnInfoList = columnInfoList;
     this.columnTypeList = columnTypeList;
     this.ignoreTimestamp = ignoreTimestamp;
+    checkNonAlignDataset();
+  }
+
+  private void checkNonAlignDataset() {

Review comment:
       I think add logic on IoTDBNonAlignJDBCResultSet is better.




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