Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions python/pyiceberg/cli/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def list(ctx: Context, parent: Optional[str]): # pylint: disable=redefined-buil
@click.pass_context
@catch_exception()
def describe(ctx: Context, entity: Literal["name", "namespace", "table"], identifier: str):
"""Describes a namespace xor table"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually a bad joke. If you have hierarchical namespaces, then it will describe the namespace, namespace.namespace.table, in the case of a table namespace.table it would describe the table. But wouldn't do both (because that's not possible). But I agree that this is better :)

"""Describes a namespace or a table"""
catalog, output = _catalog_and_output(ctx)
identifier_tuple = Catalog.identifier_to_tuple(identifier)

Expand Down Expand Up @@ -198,7 +198,7 @@ def drop():
@click.pass_context
@catch_exception()
def table(ctx: Context, identifier: str): # noqa: F811
"""Drop table"""
"""Drops a table"""
catalog, output = _catalog_and_output(ctx)

catalog.drop_table(identifier)
Expand All @@ -210,7 +210,7 @@ def table(ctx: Context, identifier: str): # noqa: F811
@click.pass_context
@catch_exception()
def namespace(ctx, identifier: str):
"""Drop namespace"""
"""Drops a namespace"""
catalog, output = _catalog_and_output(ctx)

catalog.drop_namespace(identifier)
Expand Down Expand Up @@ -286,7 +286,7 @@ def get_table(ctx: Context, identifier: str, property_name: str):

@properties.group()
def set():
"""Removes properties on tables/namespaces"""
"""Sets a property on tables/namespaces"""
Copy link
Contributor

@singhpk234 singhpk234 Dec 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[minor] should we update this line as well :
[1] https://github.com/apache/iceberg/pull/6372/files#diff-6a69efbab813860a0fb4f238e55a67bc64c3fe5c307647faca64a23e2a8dc875R299
to """Sets a property of a namespace"""

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you @singhpk234 , updated per your suggestion



@set.command() # type: ignore
Expand All @@ -296,7 +296,7 @@ def set():
@click.pass_context
@catch_exception()
def namespace(ctx: Context, identifier: str, property_name: str, property_value: str): # noqa: F811
"""Sets a property of a namespace or table"""
"""Sets a property on a namespace"""
catalog, output = _catalog_and_output(ctx)

catalog.update_namespace_properties(identifier, updates={property_name: property_value})
Expand All @@ -321,7 +321,7 @@ def table(ctx: Context, identifier: str, property_name: str, property_value: str

@properties.group()
def remove():
"""Removes properties on tables/namespaces"""
"""Removes a property from tables/namespaces"""


@remove.command() # type: ignore
Expand Down