Skip to content

Commit

Permalink
minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
scottsand-db committed Dec 3, 2024
1 parent 98f2fe3 commit 6f6883c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions kernel/kernel-api/src/main/java/io/delta/kernel/Snapshot.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
public interface Snapshot {

/**
* Get the version of this snapshot in the table.
* Get the version of this snapshot in the table. Returns -1 if the table is empty and so has no
* commits.
*
* @param engine {@link Engine} instance to use in Delta Kernel.
* @return version of this snapshot in the Delta table
Expand All @@ -38,7 +39,7 @@ public interface Snapshot {

/**
* Get the timestamp (in milliseconds since the Unix epoch) of the latest commit of this snapshot.
* For an uninitialized snapshot, this returns -1.
* 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public long getVersion(Engine engine) {

@Override
public long getTimestamp(Engine engine) {
if (TableConfig.isICTEnabled(engine, metadata)) {
if (IN_COMMIT_TIMESTAMPS_ENABLED.fromMetadata(metadata)) {
if (!inCommitTimestampOpt.isPresent()) {
Optional<CommitInfo> commitInfoOpt =
CommitInfo.getCommitInfoOpt(engine, logPath, logSegment.version);
Expand Down

0 comments on commit 6f6883c

Please sign in to comment.