tom-s-powell commented on code in PR #19147:
URL: https://github.com/apache/iceberg/pull/19147#discussion_r4698656612
##########
api/src/main/java/org/apache/iceberg/io/SupportsPrefixOperations.java:
##########
@@ -35,6 +35,39 @@ public interface SupportsPrefixOperations extends FileIO {
*/
Iterable<FileInfo> listPrefix(String prefix);
+ /**
+ * Lists the files and subdirectories directly below a directory prefix.
+ *
+ * <p>The separator is always {@code /}, and {@code prefix} must end in
{@code /}. Files below
Review Comment:
One contract detail worth discussing: should `listDirectory` require a
trailing `/`, or accept both `.../table` and `.../table/` and normalize
internally?
Both forms would have directory semantics: `table` would mean the contents
of `table/`, without matching siblings such as `table_backup/`.
Keeping `/` as the fixed separator simplifies the API. Does requiring
callers to supply the trailing slash provide enough benefit to justify the
extra normalization at call sites?
--
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]