zhiqiang-hhhh commented on code in PR #35602:
URL: https://github.com/apache/doris/pull/35602#discussion_r1620066274


##########
fe/fe-core/src/main/java/org/apache/doris/common/util/DebugUtil.java:
##########
@@ -135,6 +137,28 @@ public static String printId(final TUniqueId id) {
         return builder.toString();
     }
 
+    // id is a String generated by DebugUtil.printId(TUniqueId)
+    public static TUniqueId parseTUniqueIdFromString(String id) {
+        if (Strings.isNullOrEmpty(id)) {
+            throw new NumberFormatException("invalid query id");
+        }
+
+        String[] parts = id.split("-");
+        if (parts.length != 2) {
+            throw new NumberFormatException("invalid query id");
+        }
+
+        TUniqueId uniqueId = new TUniqueId();
+        try {
+            uniqueId.setHi(Long.parseUnsignedLong(parts[0], 16));
+            uniqueId.setLo(Long.parseUnsignedLong(parts[1], 16));
+        } catch (NumberFormatException e) {
+            throw new NumberFormatException("invalid query id:" + 
e.getMessage());

Review Comment:
   the id could be id of other task, not just query.



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to