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

Unify and supplement short-circuiting in MetadataManager #19842

Conversation

findepi
Copy link
Member

@findepi findepi commented Nov 21, 2023

Prevent passing impossible names down to the connectors.
E.g. prevents failures if a connector chooses to convert input to
something that validates name is not impossible, like
SchemaTablePrefix.

When concurrency is not involved, it is not needed and when it is
involved, it doesn't provide more correctness.

FWIW, the `system.jdbc.tables` doesn't have similar set unioning.
Prevent passing impossible names down to the connectors.
E.g. prevents failures if a connector chooses to convert input to
something that validates name is not impossible, like
`SchemaTablePrefix`.
`listMaterializedViews` can return names already included in metastore's
relation listing.
@github-actions github-actions bot added tests:hive hive Hive connector labels Nov 21, 2023
@@ -285,7 +284,7 @@ private void addTablesRecords(QualifiedTablePrefix prefix)
}
// TODO (https://github.com/trinodb/trino/issues/8207) define a type for materialized views

for (SchemaTableName name : union(tables, views)) {
for (SchemaTableName name : tables) {
Copy link
Member

Choose a reason for hiding this comment

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

what was the reason for union in the first place?

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 don't know. The code dates back 2014 5a727b8. Maybe back then table listing didn't include views, or maybe the code author was simply confused about "list tables" means. I wouldn't be surprised either way, I've seen people being confused and connectors being implemented incorrectly (#11063). That's why i proposed renaming "list tables" to "list relations".
See #19832 (comment)

@findepi
Copy link
Member Author

findepi commented Nov 21, 2023

CI #19847 #19799

@findepi findepi merged commit 1c833bd into trinodb:master Nov 21, 2023
87 of 89 checks passed
@findepi findepi deleted the findepi/unify-and-supplement-short-circuiting-in-metadatamanager-e741cd branch November 21, 2023 16:22
@github-actions github-actions bot added this to the 434 milestone Nov 21, 2023
@mosabua
Copy link
Member

mosabua commented Nov 21, 2023

No release notes entry @findepi @losipiuk ?

@findepi findepi added the no-release-notes This pull request does not require release notes entry label Nov 21, 2023
@findepi
Copy link
Member Author

findepi commented Nov 21, 2023

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed hive Hive connector no-release-notes This pull request does not require release notes entry
Development

Successfully merging this pull request may close these issues.

3 participants