Skip to content

Commit

Permalink
Rename parameter for setSchemaAuthorization
Browse files Browse the repository at this point in the history
  • Loading branch information
electrum committed Jan 18, 2022
1 parent 8e9da98 commit 35afb5d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ public void createSchema(ConnectorSession session, String schemaName, Map<String
public void renameSchema(ConnectorSession session, String source, String target) {}

@Override
public void setSchemaAuthorization(ConnectorSession session, String source, TrinoPrincipal principal) {}
public void setSchemaAuthorization(ConnectorSession session, String schemaName, TrinoPrincipal principal) {}

@Override
public void dropSchema(ConnectorSession session, String schemaName) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ default void renameSchema(ConnectorSession session, String source, String target
/**
* Sets the user/role on the specified schema.
*/
default void setSchemaAuthorization(ConnectorSession session, String source, TrinoPrincipal principal)
default void setSchemaAuthorization(ConnectorSession session, String schemaName, TrinoPrincipal principal)
{
throw new TrinoException(NOT_SUPPORTED, "This connector does not support setting an owner on a schema");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,10 @@ public void renameSchema(ConnectorSession session, String source, String target)
}

@Override
public void setSchemaAuthorization(ConnectorSession session, String source, TrinoPrincipal principal)
public void setSchemaAuthorization(ConnectorSession session, String schemaName, TrinoPrincipal principal)
{
try (ThreadContextClassLoader ignored = new ThreadContextClassLoader(classLoader)) {
delegate.setSchemaAuthorization(session, source, principal);
delegate.setSchemaAuthorization(session, schemaName, principal);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -829,9 +829,9 @@ public void renameSchema(ConnectorSession session, String source, String target)
}

@Override
public void setSchemaAuthorization(ConnectorSession session, String source, TrinoPrincipal principal)
public void setSchemaAuthorization(ConnectorSession session, String schemaName, TrinoPrincipal principal)
{
metastore.setDatabaseOwner(new HiveIdentity(session), source, HivePrincipal.from(principal));
metastore.setDatabaseOwner(new HiveIdentity(session), schemaName, HivePrincipal.from(principal));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,9 @@ public void renameSchema(ConnectorSession session, String source, String target)
}

@Override
public void setSchemaAuthorization(ConnectorSession session, String source, TrinoPrincipal principal)
public void setSchemaAuthorization(ConnectorSession session, String schemaName, TrinoPrincipal principal)
{
catalog.setNamespacePrincipal(session, source, principal);
catalog.setNamespacePrincipal(session, schemaName, principal);
}

@Override
Expand Down

0 comments on commit 35afb5d

Please sign in to comment.