Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Iceberg system table handling #8692

Closed

Conversation

findepi
Copy link
Member

@findepi findepi commented Jul 28, 2021

Fixes #8690
Fixes #5459
Also for #8675 (#8675 (comment))

@findepi
Copy link
Member Author

findepi commented Jul 28, 2021

CI #8691 & a related failure.

@findepi findepi force-pushed the findepi/iceberg-system-table-handling branch from d6835a4 to be6bc6e Compare July 28, 2021 15:03
name = IcebergTableName.from(tableName.getTableName());
}
catch (InvalidIcebergTableName e) {
log.debug(e, "Invalid table name when looking for a table");
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this behavior is useful. Let's change IcebergTableName.from() to return Optional and maybe rename it to parse(). The only reason we threw exceptions was to present them to the end user.

Copy link
Member Author

Choose a reason for hiding this comment

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

I realized the exceptions were thoughtfully constructed, and so i didn;'t want to just discard those messages.
But then, presenting them directly to a user would be at odds with "table not found" expected behavior.
That's why i left them as debug output, in case there is any need to debug anything.

In the future, we can emit them as warnings. If it makes sense to you as well, i will add a TODO in the code.

Copy link
Member

Choose a reason for hiding this comment

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

They were thoughtfully constructed because they were presented to end users. Since these are no longer displayed anywhere, I'd rather just remove the code.

Copy link
Member

Choose a reason for hiding this comment

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

Actually, I'm not convinced that NOT_FOUND is necessarily the right behavior here. These are hidden tables, so there's nothing preventing us from saying that they do exist but are invalid. These would be similar to a Hive table that exists but has bad metadata, for which we would throw HIVE_INVALID_METADATA. Or how we throw HIVE_UNSUPPORTED_FORMAT for Delta Lake tables.

@findepi findepi requested a review from electrum July 29, 2021 07:51
@findepi findepi force-pushed the findepi/iceberg-system-table-handling branch from 36e1e25 to 71feabb Compare August 24, 2021 08:00
@findepi findepi requested review from losipiuk, sopel39, martint, electrum and phd3 and removed request for electrum, homar, sopel39, phd3 and hashhar August 24, 2021 08:01
@findepi findepi force-pushed the findepi/iceberg-system-table-handling branch from 71feabb to 8524e1e Compare August 24, 2021 10:36
@findepi
Copy link
Member Author

findepi commented Aug 24, 2021

CI #8691

@findepi findepi closed this Sep 21, 2021
@findepi findepi deleted the findepi/iceberg-system-table-handling branch September 21, 2021 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants