morningman commented on code in PR #52120:
URL: https://github.com/apache/doris/pull/52120#discussion_r2162851274


##########
fe/fe-core/src/main/java/org/apache/doris/fs/obj/S3ObjStorage.java:
##########
@@ -542,11 +542,28 @@ public Status globList(String remotePath, 
List<RemoteFile> result, boolean fileN
 
             String listPrefix = S3Util.getLongestPrefix(globPath); // similar 
to Azure
             if (LOG.isDebugEnabled()) {
-                LOG.debug("globList listPrefix: {}", listPrefix);
+                LOG.debug("globList listPrefix: '{}' (from globPath: '{}')", 
listPrefix, globPath);
             }
+
+            // For Directory Buckets, ensure proper prefix handling using 
standardized approach
+            String finalPrefix = listPrefix;

Review Comment:
   Suggest to extract a method in S3URI, to test it separately



##########
fe/fe-core/src/main/java/org/apache/doris/common/util/S3URI.java:
##########
@@ -332,4 +335,47 @@ public String toString() {
         sb.append('}');
         return sb.toString();
     }
+
+    /**
+     * Converts the current S3URI to a directory path.
+     *
+     * <p>This method ensures that the S3URI represents a directory by adding 
a "/" delimiter at the
+     * end of the key if it's not already present.
+     *
+     * @return a S3URI with the directory path configured
+     */
+    public S3URI toDirectoryPath() throws UserException {

Review Comment:
   Add unit test



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


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

Reply via email to