chinmay-bhat commented on code in PR #728:
URL: https://github.com/apache/iceberg-python/pull/728#discussion_r1614623487
##########
tests/table/test_init.py:
##########
@@ -652,6 +652,58 @@ def test_update_metadata_add_snapshot(table_v2: Table) ->
None:
assert new_metadata.last_updated_ms == new_snapshot.timestamp_ms
+def test_update_metadata_create_tag(table_v2: Table) -> None:
+ update =
table_v2.manage_snapshots().create_tag(snapshot_id=3051729675574597004,
tag_name="test123")
+
+ new_metadata = update.table_metadata
Review Comment:
I tried committing the transaction, but that raises this error (below). I
believe the api is expecting a live Noop catalog to perform the commit.
Instead, I'm now using `update_table_metadata(table_v2.metadata,
ms._updates)` that's also used in similar tests. Since the api is only changing
the metadata, I think updating the table with the new metadata should be enough.
Is this ok?
error:
```
> ms.commit()
test_init.py:660:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
../../pyiceberg/table/__init__.py:1877: in commit
self._transaction._apply(*self._commit())
../../pyiceberg/table/__init__.py:302: in _apply
self.commit_transaction()
../../pyiceberg/table/__init__.py:577: in commit_transaction
self._table._do_commit( # pylint: disable=W0212
../../pyiceberg/table/__init__.py:1444: in _do_commit
response = self.catalog._commit_table( # pylint: disable=W0212
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
self = NoopCatalog (<class 'pyiceberg.catalog.noop.NoopCatalog'>)
table_request =
CommitTableRequest(identifier=TableIdentifier(namespace=Namespace(root=['database']),
name='table'), requirements=(Ass...e='tag', snapshot_id=3051729675574597004,
max_ref_age_ms=None, max_snapshot_age_ms=None, min_snapshots_to_keep=None),))
def _commit_table(self, table_request: CommitTableRequest) ->
CommitTableResponse:
> raise NotImplementedError
E NotImplementedError
```
--
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]