stevenzwu commented on code in PR #19019:
URL: https://github.com/apache/iceberg/pull/19019#discussion_r4759309671


##########
api/src/main/java/org/apache/iceberg/ContentFile.java:
##########
@@ -183,6 +183,19 @@ default Long fileSequenceNumber() {
     return null;
   }
 
+  /**
+   * Returns the microsecond timestamp of the snapshot that added or changed 
this file.

Review Comment:
   done



##########
core/src/main/java/org/apache/iceberg/TrackingBuilder.java:
##########
@@ -116,6 +118,7 @@ private TrackingBuilder(Tracking source, long 
newSnapshotId) {
     this.modifiedSnapshotId = source.modifiedSnapshotId();
     this.deletedPositions = null;
     this.replacedPositions = null;
+    this.snapshotTimestampMicros = source.snapshotTimestampMicros();

Review Comment:
   Agreed. I added timestamp-preservation assertions for `dvUpdated()`, 
`deletedPositions()` and `replacedPositions()`.



##########
core/src/main/java/org/apache/iceberg/RootManifestFile.java:
##########
@@ -42,6 +43,7 @@ static RootManifestFile from(Snapshot snapshot, String 
tableLocation, FileIO io)
         io.newInputFile(location).getLength(),
         snapshot.snapshotId(),
         snapshot.sequenceNumber(),
+        TimeUnit.MILLISECONDS.toMicros(snapshot.timestampMillis()),

Review Comment:
   I added a separate test (`fromConvertsSnapshotTimestampToMicros`) that stubs 
`timestampMillis()` and checks the micros value, per Amogh's suggestion.



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