Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
HangyuanLiu committed Dec 27, 2024
1 parent e7e708b commit 49b0ed8
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
public interface BasicTable {
String getCatalogName();

String getDbName();

String getName();

String getComment();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ public String getCatalogName() {
return catalogName;
}

@Override
public String getDbName() {
return dbName;
}

@Override
public String getName() {
return tableName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public static void checkAnyActionOnTableLikeObject(UserIdentity currentUser, Set
doCheckTableLikeObject(currentUser, roleIds, dbName, tableBasicInfo, null);
}

private static void doCheckTableLikeObject(UserIdentity currentUser, Set<Long> roleIds,
private static void doCheckTableLikeObject(UserIdentity currentUser, Set<Long> roleIds, String dbName,
BasicTable tbl, PrivilegeType privilegeType) throws AccessDeniedException {
if (tbl == null) {
return;
Expand All @@ -210,7 +210,7 @@ private static void doCheckTableLikeObject(UserIdentity currentUser, Set<Long> r
case KUDU:
// `privilegeType == null` meaning we don't check specified action, just any action
if (privilegeType == null) {
checkAnyActionOnTable(currentUser, roleIds, new TableName(tbl.getCatalogName(), tbl.get, tbl.getName()));
checkAnyActionOnTable(currentUser, roleIds, new TableName(tbl.getCatalogName(), dbName, tbl.getName()));
} else {
checkTableAction(currentUser, roleIds, dbName, tbl.getName(), privilegeType);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1491,7 +1491,7 @@ public void testCreateView(@Mocked RESTCatalog restCatalog, @Mocked BaseView bas
};

CreateViewStmt stmt = new CreateViewStmt(false, false, new TableName("catalog", "db", "table"),
Lists.newArrayList(new ColWithComment("k1", "", NodePosition.ZERO)), "", null, NodePosition.ZERO);
Lists.newArrayList(new ColWithComment("k1", "", NodePosition.ZERO)), "", false, null, NodePosition.ZERO);
stmt.setColumns(Lists.newArrayList(new Column("k1", INT)));
metadata.createView(stmt);

Expand Down

0 comments on commit 49b0ed8

Please sign in to comment.