huaxingao commented on code in PR #19019:
URL: https://github.com/apache/iceberg/pull/19019#discussion_r4649019776
##########
core/src/main/java/org/apache/iceberg/TrackingStruct.java:
##########
@@ -62,6 +63,7 @@ class TrackingStruct extends SupportsIndexProjection
implements Tracking, Serial
private Long firstRowId = null;
private byte[] deletedPositions = null;
private byte[] replacedPositions = null;
+ private Long snapshotTimestampMicros = null;
Review Comment:
The spec in #18526 says that when writing any manifest, a new (ADDED) entry
"must have a null snapshot_timestamp". It doesn't make an exception for the
root manifest. But your plan above says the root manifest writer will write the
commit time for new entries. For sequence numbers, the spec only asks for null
in leaf manifests, so the root writer can fill them in. Should the timestamp
rule allow the same, or should the root writer leave it null?
##########
core/src/main/java/org/apache/iceberg/TrackingBuilder.java:
##########
@@ -97,6 +98,7 @@ private TrackingBuilder(Long newSnapshotId) {
this.modifiedSnapshotId = null;
this.deletedPositions = null;
this.replacedPositions = null;
+ this.snapshotTimestampMicros = null;
Review Comment:
When a file is added with an older sequence number (`appendAtSeq`, used by
compaction), it keeps the old sequence number, but its timestamp is null here,
so it gets the new commit's time. The two values then disagree: the rows look
old by sequence number but new by timestamp. Should these files keep an older
timestamp too? #18526 requires null for all ADDED entries, so this would need a
spec change 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]