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/12 01:52:12 UTC

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

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