oneonestar commented on issue #9723:
URL: https://github.com/apache/iceberg/issues/9723#issuecomment-1944060001

   > latest_snapshot_id -> This is the snapshot ID that was the state of the 
table at the time the metadata file in the log entry was the metadata file for 
the table.
   
   By this definition, `latest_snapshot_id` should be equal to the 
`current-snapshot-id` in that metadata file.
   This should held true even after replace, but now the result is null.
   
   > Since the replace eliminates the previous history it's not possible to 
determine this snapshot so null is returned.
   
   We can always get the `current-snapshot-id` from that metadata file. I 
understand that going through all the metadata files is costly. Using timestamp 
to do a lookup in `metadata-log` and `snapshot-log` is a reasonable 
implementation decision. However, it doesn't look correct to return NULL when 
there is actually a `snapshot_id` exist for that metadata file.
   
   Another way is to define `metadata_log_entries` table ONLY return the 
`metadata-log` lookup with `snapshot-log` in the current metadata file.


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