Caideyipi commented on code in PR #17925:
URL: https://github.com/apache/iotdb/pull/17925#discussion_r4374537446


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/AnalyzeUtils.java:
##########
@@ -332,16 +333,41 @@ public static void validateSchema(
     boolean hasFailedMeasurement = insertStatement.hasFailedMeasurements();
     String partialInsertMessage;
     if (hasFailedMeasurement && !analysis.isFinishQueryAfterAnalyze()) {
+      final List<String> failedMeasurements = new ArrayList<>();
+      final List<String> failedMessages = new ArrayList<>();
+      collectDistinctFailedMeasurementMessages(
+          insertStatement.getFailedMeasurements(),
+          insertStatement.getFailedMessages(),
+          failedMeasurements,
+          failedMessages);
       partialInsertMessage =
           String.format(
-              "Fail to insert measurements %s caused by %s",
-              insertStatement.getFailedMeasurements(), 
insertStatement.getFailedMessages());
+              "Fail to insert measurements %s caused by %s", 
failedMeasurements, failedMessages);

Review Comment:
   [P2] The partial-insert summary message still bypasses the Chinese locale. 
This English template is used both in logs and in the `TSStatus` returned to 
clients, so `with-zh-locale` still reports `Fail to insert measurements ... 
caused by ...`. Under the project's i18n rules, add the full template to the 
en/zh `DataNodeQueryMessages` classes under the same constant name. The two 
status-message assertions added by this PR should also use the locale-specific 
template. Keep the English output compatible and verify the Chinese output.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to