Skip to content

Commit

Permalink
Remove deprecated getInfo API involving LayoutHandle
Browse files Browse the repository at this point in the history
  • Loading branch information
Praveen2112 committed Jan 13, 2022
1 parent d058c8a commit 76d7141
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -540,17 +540,6 @@ public Optional<Object> getInfo(Session session, TableHandle handle)
CatalogName catalogName = handle.getCatalogName();
ConnectorMetadata metadata = getMetadata(session, catalogName);

if (usesLegacyTableLayouts(session, handle)) {
ConnectorTableLayoutHandle layoutHandle = handle.getLayout()
.orElseGet(() -> getLayout(session, handle, Constraint.alwaysTrue(), Optional.empty())
.get()
.getNewTableHandle()
.getLayout()
.get());

return metadata.getInfo(layoutHandle);
}

return metadata.getInfo(handle.getConnectorHandle());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,17 +247,6 @@ default ConnectorTableMetadata getTableMetadata(ConnectorSession session, Connec
throw new TrinoException(GENERIC_INTERNAL_ERROR, "ConnectorMetadata getTableHandle() is implemented without getTableMetadata()");
}

/**
* Return the connector-specific metadata for the specified table layout. This is the object that is passed to the event listener framework.
*
* @throws RuntimeException if table handle is no longer valid
*/
@Deprecated
default Optional<Object> getInfo(ConnectorTableLayoutHandle layoutHandle)
{
return Optional.empty();
}

default Optional<Object> getInfo(ConnectorTableHandle table)
{
return Optional.empty();
Expand Down Expand Up @@ -1021,7 +1010,6 @@ default List<GrantInfo> listTablePrivileges(ConnectorSession session, SchemaTabl
* connectors are required to implement the following methods:
* <ul>
* <li>{@link #getTableProperties(ConnectorSession session, ConnectorTableHandle table)}</li>
* <li>{@link #getInfo(ConnectorTableHandle table)} </li>
* </ul>
*/
default boolean usesLegacyTableLayouts()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,6 @@ public ConnectorTableMetadata getTableMetadata(ConnectorSession session, Connect
}
}

@Override
public Optional<Object> getInfo(ConnectorTableLayoutHandle table)
{
try (ThreadContextClassLoader ignored = new ThreadContextClassLoader(classLoader)) {
return delegate.getInfo(table);
}
}

@Override
public Optional<Object> getInfo(ConnectorTableHandle table)
{
Expand Down

0 comments on commit 76d7141

Please sign in to comment.