vinothchandar commented on code in PR #19212:
URL: https://github.com/apache/hudi/pull/19212#discussion_r3568309536


##########
hudi-common/src/main/java/org/apache/hudi/common/util/TablePathUtils.java:
##########
@@ -102,14 +102,16 @@ private static Option<StoragePath> 
getTablePathFromPartitionPath(HoodieStorage s
       } else {
         // Simply traverse directory structure until found .hoodie folder
         StoragePath current = partitionPath;
-        while (current != null) {
+        while (true) {
           if (hasTableMetadataFolder(storage, current)) {
             return Option.of(current);
           }
+          if (current.depth() == 0) {

Review Comment:
   TestTablePathUtils#getTablePathReturnsEmptyForNonHudiPath creates a 
directory tree with no .hoodie anywhere up its ancestry, so the walk runs all 
the way to the filesystem root



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