This is an automated email from the ASF dual-hosted git repository.

starocean999 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 1ebcb221c42 [Chore](nereids) optimize iter in validate() (#55508)
1ebcb221c42 is described below

commit 1ebcb221c42bfed883a8f4fce5ec9f0358469b42
Author: yaoxiao <[email protected]>
AuthorDate: Mon Sep 1 15:23:37 2025 +0800

    [Chore](nereids) optimize iter in validate() (#55508)
---
 .../trees/plans/commands/AdminCopyTabletCommand.java  | 19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/AdminCopyTabletCommand.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/AdminCopyTabletCommand.java
index c6ae1ad5fdc..45f1d138e9e 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/AdminCopyTabletCommand.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/AdminCopyTabletCommand.java
@@ -49,7 +49,6 @@ import com.google.common.collect.Lists;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
@@ -120,29 +119,21 @@ public class AdminCopyTabletCommand extends ShowCommand {
         if (properties == null) {
             return;
         }
+
         try {
-            Iterator<Map.Entry<String, String>> iter = 
properties.entrySet().iterator();
-            while (iter.hasNext()) {
-                Map.Entry<String, String> entry = iter.next();
+            for (Map.Entry<String, String> entry : properties.entrySet()) {
                 if (entry.getKey().equalsIgnoreCase(PROP_VERSION)) {
-                    version = Long.valueOf(entry.getValue());
-                    iter.remove();
+                    version = Long.parseLong(entry.getValue());
                 } else if (entry.getKey().equalsIgnoreCase(PROP_BACKEND_ID)) {
-                    backendId = Long.valueOf(entry.getValue());
-                    iter.remove();
+                    backendId = Long.parseLong(entry.getValue());
                 } else if (entry.getKey().equalsIgnoreCase(PROP_EXPIRATION)) {
-                    expirationMinutes = Long.valueOf(entry.getValue());
+                    expirationMinutes = Long.parseLong(entry.getValue());
                     expirationMinutes = Math.min(DEFAULT_EXPIRATION_MINUTES, 
expirationMinutes);
-                    iter.remove();
                 }
             }
         } catch (NumberFormatException e) {
             throw new AnalysisException("Invalid property: " + e.getMessage());
         }
-
-        if (!properties.isEmpty()) {
-            throw new AnalysisException("Unknown property: " + properties);
-        }
     }
 
     private ShowResultSet handleCopyTablet() throws AnalysisException {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to