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/01/11 05:42:17 UTC

[GitHub] [incubator-iotdb] Genius-pig opened a new pull request #728: fix the client display.

Genius-pig opened a new pull request #728: fix the client display.
URL: https://github.com/apache/incubator-iotdb/pull/728
 
 
   fix the client display.

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


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] JackieTien97 commented on a change in pull request #728: [IOTDB-414] fix the client display.

Posted by GitBox <gi...@apache.org>.
JackieTien97 commented on a change in pull request #728: [IOTDB-414] fix the client display.
URL: https://github.com/apache/incubator-iotdb/pull/728#discussion_r365553219
 
 

 ##########
 File path: client/src/main/java/org/apache/iotdb/client/AbstractClient.java
 ##########
 @@ -478,15 +478,17 @@ private static void printBlockLine(boolean printTimestamp, int colCount,
     } else {
       blockLine.append("+");
     }
-    if (resultSetMetaData.getColumnName(2).equals(GROUPBY_DEVICE_COLUMN_NAME)) {
-      maxValueLength = measurementColumnLength;
-    } else {
-      int tmp = Integer.MIN_VALUE;
-      for (int i = 1; i <= colCount; i++) {
-        int len = resultSetMetaData.getColumnLabel(i).length();
-        tmp = Math.max(tmp, len);
+    if(printTimestamp) {
+      if (resultSetMetaData.getColumnName(2).equals(GROUPBY_DEVICE_COLUMN_NAME)) {
+        maxValueLength = measurementColumnLength;
+      } else {
+        int tmp = Integer.MIN_VALUE;
+        for (int i = 1; i <= colCount; i++) {
+          int len = resultSetMetaData.getColumnLabel(i).length();
+          tmp = Math.max(tmp, len);
+        }
+        maxValueLength = tmp;
       }
-      maxValueLength = tmp;
     }
     if(printTimestamp) {
 
 Review comment:
   it can create successfully, but it does the wrong thing, I think we should choose one bewteen syntax `compression` and `compressor`.
   <img width="1103" alt="image" src="https://user-images.githubusercontent.com/16079446/72213235-dca3b600-3525-11ea-908e-3f8096ef1b68.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


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] SolomonAnn commented on a change in pull request #728: [IOTDB-414] fix the client display.

Posted by GitBox <gi...@apache.org>.
SolomonAnn commented on a change in pull request #728: [IOTDB-414] fix the client display.
URL: https://github.com/apache/incubator-iotdb/pull/728#discussion_r365553125
 
 

 ##########
 File path: client/src/main/java/org/apache/iotdb/client/AbstractClient.java
 ##########
 @@ -478,15 +478,17 @@ private static void printBlockLine(boolean printTimestamp, int colCount,
     } else {
       blockLine.append("+");
     }
-    if (resultSetMetaData.getColumnName(2).equals(GROUPBY_DEVICE_COLUMN_NAME)) {
-      maxValueLength = measurementColumnLength;
-    } else {
-      int tmp = Integer.MIN_VALUE;
-      for (int i = 1; i <= colCount; i++) {
-        int len = resultSetMetaData.getColumnLabel(i).length();
-        tmp = Math.max(tmp, len);
+    if(printTimestamp) {
+      if (resultSetMetaData.getColumnName(2).equals(GROUPBY_DEVICE_COLUMN_NAME)) {
+        maxValueLength = measurementColumnLength;
+      } else {
+        int tmp = Integer.MIN_VALUE;
+        for (int i = 1; i <= colCount; i++) {
+          int len = resultSetMetaData.getColumnLabel(i).length();
+          tmp = Math.max(tmp, len);
+        }
+        maxValueLength = tmp;
       }
-      maxValueLength = tmp;
     }
     if(printTimestamp) {
 
 Review comment:
   The "create timeseries" statement with the "compression" argument can't still print successfully.

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


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] Genius-pig commented on a change in pull request #728: [IOTDB-414] fix the client display.

Posted by GitBox <gi...@apache.org>.
Genius-pig commented on a change in pull request #728: [IOTDB-414] fix the client display.
URL: https://github.com/apache/incubator-iotdb/pull/728#discussion_r365555435
 
 

 ##########
 File path: client/src/main/java/org/apache/iotdb/client/AbstractClient.java
 ##########
 @@ -478,15 +478,17 @@ private static void printBlockLine(boolean printTimestamp, int colCount,
     } else {
       blockLine.append("+");
     }
-    if (resultSetMetaData.getColumnName(2).equals(GROUPBY_DEVICE_COLUMN_NAME)) {
-      maxValueLength = measurementColumnLength;
-    } else {
-      int tmp = Integer.MIN_VALUE;
-      for (int i = 1; i <= colCount; i++) {
-        int len = resultSetMetaData.getColumnLabel(i).length();
-        tmp = Math.max(tmp, len);
+    if(printTimestamp) {
+      if (resultSetMetaData.getColumnName(2).equals(GROUPBY_DEVICE_COLUMN_NAME)) {
+        maxValueLength = measurementColumnLength;
+      } else {
+        int tmp = Integer.MIN_VALUE;
+        for (int i = 1; i <= colCount; i++) {
+          int len = resultSetMetaData.getColumnLabel(i).length();
+          tmp = Math.max(tmp, len);
+        }
+        maxValueLength = tmp;
       }
-      maxValueLength = tmp;
     }
     if(printTimestamp) {
 
 Review comment:
   Compression is a wrong syntax, the wrong syntax doesn't mean it gives an error message. Instead, It is identified as a normal property and doesn't influence anything. So if you use `create timeseries root.sg1.d2.s1 with datatype=INT64, encoding=RLE, compression=SNAPPY;`, root.sg1.d2.s1 will use UNCOMPRESSED.

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


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] JackieTien97 commented on a change in pull request #728: [IOTDB-414] fix the client display.

Posted by GitBox <gi...@apache.org>.
JackieTien97 commented on a change in pull request #728: [IOTDB-414] fix the client display.
URL: https://github.com/apache/incubator-iotdb/pull/728#discussion_r365551107
 
 

 ##########
 File path: client/src/main/java/org/apache/iotdb/client/AbstractClient.java
 ##########
 @@ -478,15 +478,17 @@ private static void printBlockLine(boolean printTimestamp, int colCount,
     } else {
       blockLine.append("+");
     }
-    if (resultSetMetaData.getColumnName(2).equals(GROUPBY_DEVICE_COLUMN_NAME)) {
-      maxValueLength = measurementColumnLength;
-    } else {
-      int tmp = Integer.MIN_VALUE;
-      for (int i = 1; i <= colCount; i++) {
-        int len = resultSetMetaData.getColumnLabel(i).length();
-        tmp = Math.max(tmp, len);
+    if(printTimestamp) {
+      if (resultSetMetaData.getColumnName(2).equals(GROUPBY_DEVICE_COLUMN_NAME)) {
+        maxValueLength = measurementColumnLength;
+      } else {
+        int tmp = Integer.MIN_VALUE;
+        for (int i = 1; i <= colCount; i++) {
+          int len = resultSetMetaData.getColumnLabel(i).length();
+          tmp = Math.max(tmp, len);
+        }
+        maxValueLength = tmp;
       }
-      maxValueLength = tmp;
     }
     if(printTimestamp) {
 
 Review comment:
   Why not merge this if(printTimestamp) into next?

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


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] qiaojialin merged pull request #728: [IOTDB-414] fix the client display and add COMPRESSION keyword.

Posted by GitBox <gi...@apache.org>.
qiaojialin merged pull request #728: [IOTDB-414] fix the client display and add COMPRESSION keyword.
URL: https://github.com/apache/incubator-iotdb/pull/728
 
 
   

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


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] JackieTien97 commented on a change in pull request #728: [IOTDB-414] fix the client display.

Posted by GitBox <gi...@apache.org>.
JackieTien97 commented on a change in pull request #728: [IOTDB-414] fix the client display.
URL: https://github.com/apache/incubator-iotdb/pull/728#discussion_r365552226
 
 

 ##########
 File path: client/src/main/java/org/apache/iotdb/client/AbstractClient.java
 ##########
 @@ -478,15 +478,17 @@ private static void printBlockLine(boolean printTimestamp, int colCount,
     } else {
       blockLine.append("+");
     }
-    if (resultSetMetaData.getColumnName(2).equals(GROUPBY_DEVICE_COLUMN_NAME)) {
-      maxValueLength = measurementColumnLength;
-    } else {
-      int tmp = Integer.MIN_VALUE;
-      for (int i = 1; i <= colCount; i++) {
-        int len = resultSetMetaData.getColumnLabel(i).length();
-        tmp = Math.max(tmp, len);
+    if(printTimestamp) {
+      if (resultSetMetaData.getColumnName(2).equals(GROUPBY_DEVICE_COLUMN_NAME)) {
+        maxValueLength = measurementColumnLength;
+      } else {
+        int tmp = Integer.MIN_VALUE;
+        for (int i = 1; i <= colCount; i++) {
+          int len = resultSetMetaData.getColumnLabel(i).length();
+          tmp = Math.max(tmp, len);
+        }
+        maxValueLength = tmp;
       }
-      maxValueLength = tmp;
     }
     if(printTimestamp) {
 
 Review comment:
   And I try your version, it seems that you didn't fix the "show storage group" problem. It still show the error message.

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


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] Genius-pig commented on a change in pull request #728: [IOTDB-414] fix the client display.

Posted by GitBox <gi...@apache.org>.
Genius-pig commented on a change in pull request #728: [IOTDB-414] fix the client display.
URL: https://github.com/apache/incubator-iotdb/pull/728#discussion_r365555435
 
 

 ##########
 File path: client/src/main/java/org/apache/iotdb/client/AbstractClient.java
 ##########
 @@ -478,15 +478,17 @@ private static void printBlockLine(boolean printTimestamp, int colCount,
     } else {
       blockLine.append("+");
     }
-    if (resultSetMetaData.getColumnName(2).equals(GROUPBY_DEVICE_COLUMN_NAME)) {
-      maxValueLength = measurementColumnLength;
-    } else {
-      int tmp = Integer.MIN_VALUE;
-      for (int i = 1; i <= colCount; i++) {
-        int len = resultSetMetaData.getColumnLabel(i).length();
-        tmp = Math.max(tmp, len);
+    if(printTimestamp) {
+      if (resultSetMetaData.getColumnName(2).equals(GROUPBY_DEVICE_COLUMN_NAME)) {
+        maxValueLength = measurementColumnLength;
+      } else {
+        int tmp = Integer.MIN_VALUE;
+        for (int i = 1; i <= colCount; i++) {
+          int len = resultSetMetaData.getColumnLabel(i).length();
+          tmp = Math.max(tmp, len);
+        }
+        maxValueLength = tmp;
       }
-      maxValueLength = tmp;
     }
     if(printTimestamp) {
 
 Review comment:
   Compression is a wrong syntax, the wrong syntax doesn't mean it gives an error message. Instead, It is identified as a normal property instead of "compression" and doesn't influence anything. So if you use `create timeseries root.sg1.d2.s1 with datatype=INT64, encoding=RLE, compression=SNAPPY;`, root.sg1.d2.s1 will use UNCOMPRESSED.

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


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] JackieTien97 commented on a change in pull request #728: [IOTDB-414] fix the client display.

Posted by GitBox <gi...@apache.org>.
JackieTien97 commented on a change in pull request #728: [IOTDB-414] fix the client display.
URL: https://github.com/apache/incubator-iotdb/pull/728#discussion_r365553110
 
 

 ##########
 File path: client/src/main/java/org/apache/iotdb/client/AbstractClient.java
 ##########
 @@ -478,15 +478,17 @@ private static void printBlockLine(boolean printTimestamp, int colCount,
     } else {
       blockLine.append("+");
     }
-    if (resultSetMetaData.getColumnName(2).equals(GROUPBY_DEVICE_COLUMN_NAME)) {
-      maxValueLength = measurementColumnLength;
-    } else {
-      int tmp = Integer.MIN_VALUE;
-      for (int i = 1; i <= colCount; i++) {
-        int len = resultSetMetaData.getColumnLabel(i).length();
-        tmp = Math.max(tmp, len);
+    if(printTimestamp) {
+      if (resultSetMetaData.getColumnName(2).equals(GROUPBY_DEVICE_COLUMN_NAME)) {
+        maxValueLength = measurementColumnLength;
+      } else {
+        int tmp = Integer.MIN_VALUE;
+        for (int i = 1; i <= colCount; i++) {
+          int len = resultSetMetaData.getColumnLabel(i).length();
+          tmp = Math.max(tmp, len);
+        }
+        maxValueLength = tmp;
       }
-      maxValueLength = tmp;
     }
     if(printTimestamp) {
 
 Review comment:
   Sorry for that, I try it again and it really works.
   And you can split the `printBlockLine` function into two functions.
   Because, the logic in that function is completely split by the `printTimestamp`.
   <img width="821" alt="image" src="https://user-images.githubusercontent.com/16079446/72213191-538c7f00-3525-11ea-93a3-0f82a8d883cd.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


With regards,
Apache Git Services

[GitHub] [incubator-iotdb] SolomonAnn commented on a change in pull request #728: [IOTDB-414] fix the client display.

Posted by GitBox <gi...@apache.org>.
SolomonAnn commented on a change in pull request #728: [IOTDB-414] fix the client display.
URL: https://github.com/apache/incubator-iotdb/pull/728#discussion_r365552881
 
 

 ##########
 File path: client/src/main/java/org/apache/iotdb/client/AbstractClient.java
 ##########
 @@ -478,15 +478,17 @@ private static void printBlockLine(boolean printTimestamp, int colCount,
     } else {
       blockLine.append("+");
     }
-    if (resultSetMetaData.getColumnName(2).equals(GROUPBY_DEVICE_COLUMN_NAME)) {
-      maxValueLength = measurementColumnLength;
-    } else {
-      int tmp = Integer.MIN_VALUE;
-      for (int i = 1; i <= colCount; i++) {
-        int len = resultSetMetaData.getColumnLabel(i).length();
-        tmp = Math.max(tmp, len);
+    if(printTimestamp) {
+      if (resultSetMetaData.getColumnName(2).equals(GROUPBY_DEVICE_COLUMN_NAME)) {
+        maxValueLength = measurementColumnLength;
+      } else {
+        int tmp = Integer.MIN_VALUE;
+        for (int i = 1; i <= colCount; i++) {
+          int len = resultSetMetaData.getColumnLabel(i).length();
+          tmp = Math.max(tmp, len);
+        }
+        maxValueLength = tmp;
       }
-      maxValueLength = tmp;
     }
     if(printTimestamp) {
 
 Review comment:
   > And I try your version, it seems that you didn't fix the "show storage group" problem. It still show the error message.
   
   The problem has been fixed. Perhaps you need to recompile the project.

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


With regards,
Apache Git Services