-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Remove redundant table metadata calls #17269
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -223,7 +223,18 @@ default Optional<ConnectorPartitioningHandle> getCommonPartitioningHandle(Connec | |
| * | ||
| * @throws RuntimeException if table handle is no longer valid | ||
| */ | ||
| @Deprecated // ... and optimized implementations already removed | ||
| default SchemaTableName getTableName(ConnectorSession session, ConnectorTableHandle table) | ||
|
||
| { | ||
| return getSchemaTableName(session, table); | ||
|
||
| } | ||
|
|
||
| /** | ||
| * Return schema table name for the specified table handle. | ||
| * This method is useful when requiring only {@link SchemaTableName} without other objects. | ||
| * | ||
| * @throws RuntimeException if table handle is no longer valid | ||
| */ | ||
| @Deprecated // replaced with getTableName | ||
| default SchemaTableName getSchemaTableName(ConnectorSession session, ConnectorTableHandle table) | ||
| { | ||
| return getTableSchema(session, table).getTable(); | ||
|
|
||
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.
Do we still nee
getTableSchema? It was supposed to be faster than getting table metadata and it is still slow anyway?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.
good question.
io.trino.metadata.Metadata#getTableSchemais still used & not going awayyes,
io.trino.metadata.Metadata#getTableSchemais faster thangetTableMetadata, butgetTableNameis even faster (usually no-op, since table handles typically contain the name)