huaxingao commented on code in PR #19266:
URL: https://github.com/apache/iceberg/pull/19266#discussion_r4780366348


##########
core/src/main/java/org/apache/iceberg/TrackedFileAdapters.java:
##########
@@ -1041,7 +1028,9 @@ public ByteBuffer replacedPositions() {
 
     @Override
     public Long snapshotTimestampMicros() {
-      return manifest.snapshotTimestampMicros();
+      // Pre-v4 manifests have no snapshot timestamp; the parent snapshot's 
bounds when they were

Review Comment:
   Nit: this comment is hard to read. Maybe: "Pre-v4 manifests have no snapshot 
timestamp, so use the parent snapshot's timestamp. It's the latest time they 
could have changed."



##########
core/src/main/java/org/apache/iceberg/V4Metadata.java:
##########
@@ -554,10 +573,16 @@ protected Object getInternal(int pos) {
         case 5 -> firstRowId();
         case 6 -> wrapped().deletedPositions();
         case 7 -> wrapped().replacedPositions();
-        case 8 -> wrapped().snapshotTimestampMicros();
+        case 8 -> snapshotTimestampMicros(wrapped().snapshotTimestampMicros());

Review Comment:
   This writes the commit time into the root for new (ADDED) entries. But 
#18526 says "ADDED entries must set the value to `null` (inherit)", and readers 
then take the time from the snapshot. The spec doesn't make an exception for 
the root. On #19019 I understood the root should also write null. Should we 
write null here, or should the spec be changed to allow this? Readers get the 
same value either way.
   
   Also, if ADDED entries should be null, should we check that here, like we 
already do for the file sequence number?



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