Skip to content

Commit

Permalink
feat: raise error when setting custom namespace properties
Browse files Browse the repository at this point in the history
  • Loading branch information
felixscherz committed Jan 6, 2025
1 parent 8c3ede9 commit b360565
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pyiceberg/catalog/s3tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ def commit_table(
)

def create_namespace(self, namespace: Union[str, Identifier], properties: Properties = EMPTY_DICT) -> None:
if properties:
raise NotImplementedError("Setting namespace properties is not supported.")
valid_namespace: str = self._validate_namespace_identifier(namespace)
self.s3tables.create_namespace(tableBucketARN=self.table_bucket_arn, namespace=[valid_namespace])

Expand Down Expand Up @@ -305,7 +307,7 @@ def update_namespace_properties(
self, namespace: Union[str, Identifier], removals: Optional[Set[str]] = None, updates: Properties = EMPTY_DICT
) -> PropertiesUpdateSummary:
# namespace properties are read only
raise NotImplementedError("Namespace properties are read only")
raise NotImplementedError("Namespace properties are read only.")

def purge_table(self, identifier: Union[str, Identifier]) -> None:
# purge is not supported as s3tables doesn't support delete operations
Expand Down

0 comments on commit b360565

Please sign in to comment.