You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "c-thiel (via GitHub)" <gi...@apache.org> on 2025/04/16 08:09:29 UTC

[I] View's VersionLog uses wrong timestamp if ViewVersions are reused [iceberg]

c-thiel opened a new issue, #12809:
URL: https://github.com/apache/iceberg/issues/12809

   ### Apache Iceberg version
   
   1.8.1 (latest release)
   
   ### Query engine
   
   Spark
   
   ### Please describe the bug 🐞
   
   Lets assume the following changes:
   1. ViewVersion 1 is added and set active
   2. View Version 2 is added and set active
   3. View Version 1 is set active.
   
   This resulted in the following `version_log`:
   ```json
       "version-log": [
           {
               "version-id": 1,
               "timestamp-ms": 1744716416168
           },
           {
               "version-id": 2,
               "timestamp-ms": 1744716449754
           },
           {
               "version-id": 1,
               "timestamp-ms": 1744716416168
           }
       ],
   ```
   
   Note that the last and first entries have the same timestamp, namely the timestamp of the initial ViewVersion creation.
   
   I believe this is undesired in a history, where we are interested when a certain change became active. It makes sense to use the exact timestamp of the ViewVersion if it was added in the same set of changes, but re-enabling a previously used view version (maybe years ago) should not add a history for this past timestamp.
   
   
   Fix in Rust: https://github.com/apache/iceberg-rust/pull/1218
   
   The problematic line in Java is here:
   https://github.com/apache/iceberg/blob/cc4fe4cc50043ccba89700f7948090ff87a5baee/core/src/main/java/org/apache/iceberg/view/ViewMetadata.java#L254
   
   ### Willingness to contribute
   
   - [ ] I can contribute a fix for this bug independently
   - [ ] I would be willing to contribute a fix for this bug with guidance from the Iceberg community
   - [ ] I cannot contribute a fix for this bug at this time


-- 
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: issues-unsubscribe@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] View's VersionLog uses wrong timestamp if ViewVersions are reused [iceberg]

Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra closed issue #12809: View's VersionLog uses wrong timestamp if ViewVersions are reused
URL: https://github.com/apache/iceberg/issues/12809


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] View's VersionLog uses wrong timestamp if ViewVersions are reused [iceberg]

Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on issue #12809:
URL: https://github.com/apache/iceberg/issues/12809#issuecomment-2809645128

   I agree this is a bug but i'm not sure about the fix in the rust lib. Maybe I haven't looked into this enough but the time of the creation of the metadata object seems wrong? Shouldn't it be the commit time? If that's just what we are doing in any case then I guess it's fine. 


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org