-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Unify and supplement short-circuiting in MetadataManager #19842
Conversation
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.
@@ -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) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
yes |
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
.