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
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,16 @@ private TableIdentifier toIdentifier(EntriesResponse.Entry entry) {
return TableIdentifier.of(elements.toArray(new String[elements.size()]));
}

public IcebergTable table(TableIdentifier tableIdentifier) {
IcebergContent icebergContent = fetchContent(tableIdentifier);
return icebergContent == null ? null : icebergContent.unwrap(IcebergTable.class).orElse(null);
}

public IcebergView view(TableIdentifier tableIdentifier) {
IcebergContent icebergContent = fetchContent(tableIdentifier);
return icebergContent == null ? null : icebergContent.unwrap(IcebergView.class).orElse(null);
}

public IcebergContent fetchContent(TableIdentifier tableIdentifier) {
try {
ContentKey key = NessieUtil.toKey(tableIdentifier);
Expand Down