You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "ebyhr (via GitHub)" <gi...@apache.org> on 2024/12/13 07:33:56 UTC

[I] REST catalog doesn't return old history if we execute `CREATE OR REPLACE TABLE` statement [iceberg]

ebyhr opened a new issue, #11777:
URL: https://github.com/apache/iceberg/issues/11777

   ### Apache Iceberg version
   
   1.7.1 (latest release)
   
   ### Query engine
   
   Trino
   
   ### Please describe the bug 🐞
   
   https://github.com/trinodb/trino/pull/24312 is trying to use `org.apache.iceberg.MetadataTableUtils#createMetadataTableInstance` method for history metadata table. 
   
   Only REST catalog doesn't return the past history if we execute `CREATE OR REPLACE TABLE` statement. 
   
   ```sql
   trino:tpch> TABLE "region$history";
             made_current_at           |     snapshot_id     | parent_id | is_current_ancestor
   ------------------------------------+---------------------+-----------+---------------------
    2024-12-13 16:26:02.387 Asia/Tokyo | 4753270524621689028 |      NULL | true
   (1 row)
   
   trino:tpch> CREATE OR REPLACE TABLE region AS SELECT * FROM orders;
   CREATE TABLE: 15000 rows
   
   trino:tpch> TABLE "region$history";
             made_current_at           |     snapshot_id     | parent_id | is_current_ancestor
   ------------------------------------+---------------------+-----------+---------------------
    2024-12-13 16:27:51.756 Asia/Tokyo | 7793069171159305791 |      NULL | true
   (1 row)
   
   trino:tpch> SHOW CREATE TABLE region;
                                                                             Create Table
   -----------------------------------------------------------------------------------------------------------------------------------------------------------------
    CREATE TABLE iceberg.tpch.region (
       orderkey bigint,
       custkey bigint,
       orderstatus varchar,
       totalprice double,
       orderdate date,
       orderpriority varchar,
       clerk varchar,
       shippriority integer,
       comment varchar
    )
    WITH (
       format = 'PARQUET',
       format_version = 2,
       location = '/var/folders/9s/_zwn4r_n2_9bp0krllp1pl3c0000gp/T/a6a26fac-b6be-4c9c-b05b-cbe7ec894b2f/iceberg_data/tpch/region-4f41a42ee7f84d3093d85649bc557e46'
    )
   (1 row)
   ```
   
   [region-4f41a42ee7f84d3093d85649bc557e46.zip](https://github.com/user-attachments/files/18122848/region-4f41a42ee7f84d3093d85649bc557e46.zip)
   
   
   ### Willingness to contribute
   
   - [ ] I can contribute a fix for this bug independently
   - [X] 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] REST catalog doesn't return old history if we execute `CREATE OR REPLACE TABLE` statement [iceberg]

Posted by "amogh-jahagirdar (via GitHub)" <gi...@apache.org>.
amogh-jahagirdar closed issue #11777: REST catalog doesn't return old history if we execute `CREATE OR REPLACE TABLE` statement
URL: https://github.com/apache/iceberg/issues/11777


-- 
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] REST catalog doesn't return old history if we execute `CREATE OR REPLACE TABLE` statement [iceberg]

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

   I think we need to add a new `MetadataUpdate` class (e.g. `ResetMainBranch`) or modify `RemoveSnapshotRef` to provide an option to clear snapshot-logs or not. 


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