Skip to content

Conversation

@ndrluis
Copy link
Collaborator

@ndrluis ndrluis commented Jun 14, 2024

No description provided.

Copy link
Collaborator

@sungwy sungwy left a comment

Choose a reason for hiding this comment

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

Hi @ndrluis - thank you for working on this. I like how you separated the NoSuchTable, NoSuchIdentifier and NoSuchViewErrors here. I think there's conflict resolution to handle, but otherwise looks good to merge

@ndrluis ndrluis force-pushed the drop-view-rest branch 2 times, most recently from 11a5fd4 to 6db3355 Compare August 16, 2024 13:19
@ndrluis ndrluis requested a review from sungwy August 16, 2024 13:24
Copy link
Collaborator

@sungwy sungwy left a comment

Choose a reason for hiding this comment

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

Hi @ndrluis - sorry for the delay in reviewing this PR. It fell through my radar :(

I left a few more nits, hope you find those comments helpful!

Comment on lines 391 to 393
return {"namespace": NAMESPACE_SEPARATOR.join(identifier.namespace.root[1:]), "table": identifier.name}
else:
return {"namespace": NAMESPACE_SEPARATOR.join(identifier.namespace.root), "table": identifier.name}
Copy link
Collaborator

Choose a reason for hiding this comment

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

The view identifier is also of TableIdentifier type, so I think this would be safer, and future proof (for when we support loading views):

Suggested change
return {"namespace": NAMESPACE_SEPARATOR.join(identifier.namespace.root[1:]), "table": identifier.name}
else:
return {"namespace": NAMESPACE_SEPARATOR.join(identifier.namespace.root), "table": identifier.name}
return {"namespace": NAMESPACE_SEPARATOR.join(identifier.namespace.root[1:]), kind: identifier.name}
else:
return {"namespace": NAMESPACE_SEPARATOR.join(identifier.namespace.root), kind: identifier.name}

return identifier_tuple

def _split_identifier_for_path(self, identifier: Union[str, Identifier, TableIdentifier]) -> Properties:
def _split_identifier_for_path(self, identifier: Union[str, Identifier, TableIdentifier], kind: str = "table") -> Properties:
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: Should we introduce an enum instead of free form strings for the table kind? (table, view, there may be more kinds in the future like materialized views)

@ndrluis
Copy link
Collaborator Author

ndrluis commented Aug 29, 2024

@sungwy, thank you for your review. I will work on this tomorrow!

@ndrluis ndrluis requested a review from sungwy August 30, 2024 18:18
@ndrluis
Copy link
Collaborator Author

ndrluis commented Aug 30, 2024

@sungwy Done!

@sungwy
Copy link
Collaborator

sungwy commented Aug 31, 2024

LGTM! Thank you for adding this new API @ndrluis

@ndrluis ndrluis requested review from HonahX and kevinjqliu September 2, 2024 21:26
@sungwy sungwy merged commit 9857107 into apache:main Sep 3, 2024
@sungwy sungwy mentioned this pull request Sep 3, 2024
@ndrluis ndrluis deleted the drop-view-rest branch September 9, 2024 13:04
sungwy pushed a commit to sungwy/iceberg-python that referenced this pull request Dec 7, 2024
* Use NoSuchIdentifier instead of NoTableIdentifier

This change allows for the validation of both Tables and Views.

* Add drop_view to the rest catalog

* fixup! Add drop_view to the rest catalog
sungwy pushed a commit to sungwy/iceberg-python that referenced this pull request Dec 7, 2024
* Use NoSuchIdentifier instead of NoTableIdentifier

This change allows for the validation of both Tables and Views.

* Add drop_view to the rest catalog

* fixup! Add drop_view to the rest catalog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants