Skip to content

Commit

Permalink
PR review: update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
scottsand-db committed Dec 4, 2024
1 parent c4f173c commit 5ac4bc2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
12 changes: 2 additions & 10 deletions kernel/kernel-api/src/main/java/io/delta/kernel/Snapshot.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
public interface Snapshot {

/**
* Get the version of this snapshot in the table. Returns -1 if the table is empty and so has no
* commits.
* Get the version of this snapshot in the table.
*
* @param engine {@link Engine} instance to use in Delta Kernel.
* @return version of this snapshot in the Delta table
Expand All @@ -50,14 +49,7 @@ public interface Snapshot {
List<String> getPartitionColumnNames(Engine engine);

/**
* Get the timestamp (in milliseconds since the Unix epoch) of the latest commit of this snapshot.
* Returns -1 if the table is empty and so has no commits.
*
* <p>When InCommitTimestampTableFeature is enabled, the timestamp is retrieved from the
* CommitInfo of the latest commit which can result in an IO operation.
*
* <p>For non-ICT tables, this is the same as the file modification time of the latest commit in
* the snapshot.
* Get the timestamp (in milliseconds since the Unix epoch) of the latest commit in this snapshot.
*
* @param engine the engine to use for IO operations
* @return the timestamp of the latest commit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ public long getVersion(Engine engine) {
return version;
}

/**
* Get the timestamp (in milliseconds since the Unix epoch) of the latest commit in this Snapshot.
*
* <p>When InCommitTimestampTableFeature is enabled, the timestamp is retrieved from the
* CommitInfo of the latest commit in this Snapshot, which can result in an IO operation.
*
* <p>For non-ICT tables, this is the same as the file modification time of the latest commit in
* this Snapshot.
*/
@Override
public long getTimestamp(Engine engine) {
if (IN_COMMIT_TIMESTAMPS_ENABLED.fromMetadata(metadata)) {
Expand Down

0 comments on commit 5ac4bc2

Please sign in to comment.