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 2022/10/26 07:36:28 UTC

[GitHub] [iotdb] HTHou commented on a diff in pull request #7728: [IOTDB-4757][IOTDB-4754]Fix concurrent register schema bug and show timeseries null element

HTHou commented on code in PR #7728:
URL: https://github.com/apache/iotdb/pull/7728#discussion_r1005323277


##########
server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/schema/TimeSeriesSchemaScanOperator.java:
##########
@@ -125,14 +125,13 @@ private void setColumns(ShowTimeSeriesResult series, TsBlockBuilder builder) {
   }
 
   private String mapToString(Map<String, String> map) {
+    if (map == null || map.isEmpty()) {
+      return null;
+    }
     String content =
         map.entrySet().stream()
             .map(e -> "\"" + e.getKey() + "\"" + ":" + "\"" + e.getValue() + "\"")
             .collect(Collectors.joining(","));
-    if (content.isEmpty()) {
-      return "null";
-    } else {
-      return "{" + content + "}";
-    }
+    return "{" + content + "}";

Review Comment:
   LGTM about the fix of IOTDB-4757.



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