You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/01/06 05:02:25 UTC

[GitHub] [iceberg] ajantha-bhat edited a comment on issue #3849: expire snapshot is deleting schema mapping from snapshots v0.12.1

ajantha-bhat edited a comment on issue #3849:
URL: https://github.com/apache/iceberg/issues/3849#issuecomment-1006286239


   @naveenkrdremio 
   I tried in 0.12.1 with my own testcase. I didn't face the issue. My testcase:
   
    ```
   sql("CREATE TABLE %s (id bigint NOT NULL, data string) USING iceberg", tableName);
   
       sql("INSERT INTO TABLE %s VALUES (1, 'a')", tableName);
       sql("INSERT INTO TABLE %s VALUES (2, 'b')", tableName);
   
       Table table = validationCatalog.loadTable(tableIdent);
   
       Assert.assertEquals("Should be 2 snapshots", 2, Iterables.size(table.snapshots()));
   
       waitUntilAfter(table.currentSnapshot().timestampMillis());
   
       sql("ALTER TABLE %s ADD COLUMN count1 int", tableName);
       sql("INSERT INTO TABLE %s VALUES (2, 'c', 10)", tableName);
   
       Timestamp currentTimestamp = Timestamp.from(Instant.ofEpochMilli(System.currentTimeMillis()));
   
       table = validationCatalog.loadTable(tableIdent);
       List<Long> id = new ArrayList<>();
       table.snapshots().forEach(x -> id.add(x.snapshotId()));
       table.expireSnapshots().expireSnapshotId(id.get(id.size() - 2)).commit();
   ```
   
   Few observations: 
   
   From your description, In V24 optional schema-id in the snapshots field is missing. But In V23 also I can see it is missing for the first snapshot. So, V23 is also result of previous expire snapshots ? 
   As Russell said better to narrow down further. 


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