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/11/17 06:43:55 UTC

[GitHub] [iotdb] MarcosZyk commented on a diff in pull request #8027: Make select into error more user-friendly

MarcosZyk commented on code in PR #8027:
URL: https://github.com/apache/iotdb/pull/8027#discussion_r1024806266


##########
server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/ClusterSchemaFetcher.java:
##########
@@ -490,7 +492,7 @@ private List<MeasurementPath> executeInternalCreateTimeseriesStatement(
           new IoTDBException(executionResult.status.getMessage(), statusCode));
     }
 
-    List<String> failedCreationList = new ArrayList<>();
+    Set<String> failedCreationList = new HashSet<>();

Review Comment:
   Rename to failedCreationMsgSet



##########
server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/ClusterSchemaFetcher.java:
##########
@@ -502,12 +504,7 @@ private List<MeasurementPath> executeInternalCreateTimeseriesStatement(
     }
 
     if (!failedCreationList.isEmpty()) {
-      StringBuilder stringBuilder = new StringBuilder();
-      for (String message : failedCreationList) {
-        stringBuilder.append(message).append("\n");
-      }
-      throw new RuntimeException(
-          new MetadataException(String.format("Failed to auto create schema\n %s", stringBuilder)));
+      throw new SemanticException(new MetadataException(String.join(";, ", failedCreationList)));

Review Comment:
   Double separator, ```;``` and ```,``` ?



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