geruh commented on issue #3068:
URL:
https://github.com/apache/iceberg-python/issues/3068#issuecomment-3929429155
Hey @Gurnek, thanks for raising.
I tested this against my glue catalog with the 0.11.0 release and haven't
been able to reproduce. Could you share some more information to help repo
because maybe I'm missing something.
For context I'm running this:
```python
catalog = GlueCatalog('glue', **{'warehouse': 's3://<bucket>/warehouse/'})
schema = Schema(
NestedField(1, 'id', IntegerType(), required=False),
NestedField(2, 'data', StringType()),
)
catalog.create_namespace_if_not_exists("db")
tbl = catalog.create_table('db.test_tbl', schema=schema)
for i in range(3):
tbl.append(pa.table({'id': pa.array([i], type=pa.int32()), 'name':
[f'data-{i}']}))
snapshots = tbl.snapshots()
target = snapshots[0].snapshot_id # <-- old snapshot
print(f'Before: {tbl.metadata.current_snapshot_id}')
tbl.manage_snapshots().rollback_to_snapshot(target).commit()
print(f'After: {tbl.metadata.current_snapshot_id}')
```
Which then prints:
```bash
Before: 6672913416757656702
After: 2295944502128096469
```
--
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]