Skip to content

Commit 79de9f1

Browse files
committed
fix: remove column and model
1 parent 82682dd commit 79de9f1

File tree

2 files changed

+0
-49
lines changed

2 files changed

+0
-49
lines changed

api/src/main/java/org/apache/gravitino/authorization/SecurableObjects.java

-32
Original file line numberDiff line numberDiff line change
@@ -88,22 +88,6 @@ public static SecurableObject ofTable(
8888
return of(MetadataObject.Type.TABLE, names, privileges);
8989
}
9090

91-
/**
92-
* Create the column {@link SecurableObject} with the given securable schema object, column name
93-
* and privileges.
94-
*
95-
* @param table The table securable object
96-
* @param column The column name
97-
* @param privileges The privileges of the column
98-
* @return The created column {@link SecurableObject}
99-
*/
100-
public static SecurableObject ofColumn(
101-
SecurableObject table, String column, List<Privilege> privileges) {
102-
List<String> names = Lists.newArrayList(DOT_SPLITTER.splitToList(table.fullName()));
103-
names.add(column);
104-
return of(MetadataObject.Type.TABLE, names, privileges);
105-
}
106-
10791
/**
10892
* Create the topic {@link SecurableObject} with the given securable schema object ,topic name and
10993
* privileges.
@@ -136,22 +120,6 @@ public static SecurableObject ofFileset(
136120
return of(MetadataObject.Type.FILESET, names, privileges);
137121
}
138122

139-
/**
140-
* Create the table {@link SecurableObject} with the given securable schema object, fileset name
141-
* and privileges.
142-
*
143-
* @param schema The schema securable object
144-
* @param model The model name
145-
* @param privileges The privileges of the model
146-
* @return The created model {@link SecurableObject}
147-
*/
148-
public static SecurableObject ofModel(
149-
SecurableObject schema, String model, List<Privilege> privileges) {
150-
List<String> names = Lists.newArrayList(DOT_SPLITTER.splitToList(schema.fullName()));
151-
names.add(model);
152-
return of(MetadataObject.Type.MODEL, names, privileges);
153-
}
154-
155123
private static class SecurableObjectImpl extends MetadataObjectImpl implements SecurableObject {
156124

157125
private List<Privilege> privileges;

core/src/test/java/org/apache/gravitino/storage/relational/service/TestSecurableObjects.java

-17
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
import org.apache.gravitino.meta.BaseMetalake;
3535
import org.apache.gravitino.meta.CatalogEntity;
3636
import org.apache.gravitino.meta.FilesetEntity;
37-
import org.apache.gravitino.meta.ModelEntity;
3837
import org.apache.gravitino.meta.RoleEntity;
3938
import org.apache.gravitino.meta.SchemaEntity;
4039
import org.apache.gravitino.meta.TableEntity;
@@ -97,17 +96,6 @@ public void testAllTypeSecurableObjects() throws IOException {
9796
auditInfo);
9897
backend.insert(topic, false);
9998

100-
ModelEntity model =
101-
createModelEntity(
102-
RandomIdGenerator.INSTANCE.nextId(),
103-
Namespace.of("metalake", "catalog", "schema"),
104-
"model",
105-
"model comment",
106-
1,
107-
ImmutableMap.of("key", "value"),
108-
auditInfo);
109-
backend.insert(model, false);
110-
11199
SecurableObject metalakeObject =
112100
SecurableObjects.ofMetalake(
113101
metalake.name(), Lists.newArrayList(Privileges.UseCatalog.allow()));
@@ -137,10 +125,6 @@ public void testAllTypeSecurableObjects() throws IOException {
137125
SecurableObjects.ofTopic(
138126
schemaObject, "topic", Lists.newArrayList(Privileges.ConsumeTopic.deny()));
139127

140-
SecurableObject modelObject =
141-
SecurableObjects.ofModel(
142-
schemaObject, "model", Lists.newArrayList(Privileges.ConsumeTopic.deny()));
143-
144128
ArrayList<SecurableObject> securableObjects =
145129
Lists.newArrayList(
146130
metalakeObject,
@@ -149,7 +133,6 @@ public void testAllTypeSecurableObjects() throws IOException {
149133
schemaObject,
150134
tableObject,
151135
filesetObject,
152-
modelObject,
153136
topicObject);
154137
securableObjects.sort(Comparator.comparing(MetadataObject::fullName));
155138

0 commit comments

Comments
 (0)