nastra commented on code in PR #5444:
URL: https://github.com/apache/iceberg/pull/5444#discussion_r938619132


##########
api/src/main/java/org/apache/iceberg/io/InputFile.java:
##########
@@ -36,6 +36,14 @@ public interface InputFile {
    */
   long getLength();
 
+  /**
+   * Returns the modification time of the file, in milliseconds
+   *
+   * @return the modification time of the file, in milliseconds
+   * @throws RuntimeIOException If the implementation throws an {@link 
IOException}
+   */
+  long getModifiedTime();

Review Comment:
   same comment as above about naming and potentially making this a `default` 
method so that we don't introduce API-breaking changes



##########
api/src/main/java/org/apache/iceberg/ContentFile.java:
##########
@@ -57,6 +57,9 @@
   /** Returns the file size in bytes. */
   long fileSizeInBytes();
 
+  /** Returns the file modified time in milliseconds. */
+  long fileModifiedTime();

Review Comment:
   I'm curious whether `lastModifiedTimeMillis()` might be a slightly better 
name? Also we might want to consider to have this return `0L` by default, so 
that we don't introduce an API-breaking change



##########
api/src/main/java/org/apache/iceberg/Files.java:
##########
@@ -117,6 +117,11 @@ public long getLength() {
       return file.length();
     }
 
+    @Override
+    public long getModifiedTime() {

Review Comment:
   maybe name this `lastModifiedTimeMillis()` here as well?



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