Fokko commented on code in PR #994:
URL: https://github.com/apache/iceberg-python/pull/994#discussion_r1709226450
##########
pyiceberg/table/__init__.py:
##########
@@ -1381,12 +1381,22 @@ def inspect(self) -> InspectTable:
def refresh(self) -> Table:
"""Refresh the current table metadata."""
- fresh = self.catalog.load_table(self.identifier[1:])
+ fresh = self.catalog.load_table(self._identifier)
self.metadata = fresh.metadata
self.io = fresh.io
self.metadata_location = fresh.metadata_location
return self
+ @property
+ def identifier(self) -> Identifier:
Review Comment:
Nice!
##########
tests/integration/test_writes/test_writes.py:
##########
@@ -1295,3 +1295,18 @@ def
test_rest_catalog_with_empty_catalog_name_append_data(session_catalog: Catal
)
tbl = _create_table(test_catalog, identifier, data=[])
tbl.append(arrow_table_with_null)
+
+
[email protected]
+def test_table_v1_with_null_nested_namespace(session_catalog: Catalog,
arrow_table_with_null: pa.Table) -> None:
+ identifier = "default.lower.table_v1_with_null_nested_namespace"
+ tbl = _create_table(session_catalog, identifier, {"format-version": "1"},
[arrow_table_with_null])
+ assert tbl.format_version == 1, f"Expected v1, got: v{tbl.format_version}"
+ print(session_catalog.list_tables("default"))
Review Comment:
Let's remove this print before merging
--
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]