abmo-x commented on code in PR #7363:
URL: https://github.com/apache/iceberg/pull/7363#discussion_r1169158275


##########
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/Spark3Util.java:
##########
@@ -996,4 +1027,134 @@ public String unknown(
       return String.format("%s(%s) %s %s", transform, sourceName, direction, 
nullOrder);
     }
   }
+
+  /**
+   * Implement our own index in-memory index which will only list directories 
to avoid unnecessary
+   * file listings. Should ONLY be used to get partition directory paths. Uses 
table's schema to
+   * only visit partition dirs using number of partition columns depth 
recursively. Does NOT return
+   * files within leaf dir.
+   */
+  private static class InMemoryLeafDirOnlyIndex extends 
PartitioningAwareFileIndex {

Review Comment:
   existing add files tests cover this. Added 2 more tests as well for other 
edge cases.



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