xunliu commented on code in PR #4141:
URL: https://github.com/apache/gravitino/pull/4141#discussion_r1682217710
##########
api/src/main/java/org/apache/gravitino/authorization/Privilege.java:
##########
@@ -43,66 +43,52 @@ public interface Privilege {
enum Name {
/** The privilege to create a catalog. */
CREATE_CATALOG(0L, 1L),
- /** The privilege to drop a catalog. */
- DROP_CATALOG(0L, 1L << 1),
- /** The privilege to alter a catalog. */
- ALTER_CATALOG(0L, 1L << 2),
/** The privilege to use a catalog. */
- USE_CATALOG(0L, 1L << 3),
+ USE_CATALOG(0L, 1L << 2),
/** The privilege to create a schema. */
- CREATE_SCHEMA(0L, 1L << 4),
- /** The privilege to drop a schema. */
- DROP_SCHEMA(0L, 1L << 5),
- /** The privilege to alter a schema. */
- ALTER_SCHEMA(0L, 1L << 6),
+ CREATE_SCHEMA(0L, 1L << 3),
/** the privilege to use a schema. */
- USE_SCHEMA(0L, 1L << 7),
+ USE_SCHEMA(0L, 1L << 4),
/** The privilege to create a table. */
- CREATE_TABLE(0L, 1L << 8),
- /** The privilege to drop a table. */
- DROP_TABLE(0L, 1L << 9),
+ CREATE_TABLE(0L, 1L << 5),
/** The privilege to write a table. */
- WRITE_TABLE(0L, 1L << 10),
+ MODIFY_TABLE(0L, 1L << 6),
/** The privilege to read a table. */
- READ_TABLE(0L, 1L << 11),
+ SELECT_TABLE(0L, 1L << 7),
Review Comment:
Please update comments.
##########
api/src/main/java/org/apache/gravitino/authorization/Privilege.java:
##########
@@ -43,66 +43,52 @@ public interface Privilege {
enum Name {
/** The privilege to create a catalog. */
CREATE_CATALOG(0L, 1L),
- /** The privilege to drop a catalog. */
- DROP_CATALOG(0L, 1L << 1),
- /** The privilege to alter a catalog. */
- ALTER_CATALOG(0L, 1L << 2),
/** The privilege to use a catalog. */
- USE_CATALOG(0L, 1L << 3),
+ USE_CATALOG(0L, 1L << 2),
/** The privilege to create a schema. */
- CREATE_SCHEMA(0L, 1L << 4),
- /** The privilege to drop a schema. */
- DROP_SCHEMA(0L, 1L << 5),
- /** The privilege to alter a schema. */
- ALTER_SCHEMA(0L, 1L << 6),
+ CREATE_SCHEMA(0L, 1L << 3),
/** the privilege to use a schema. */
- USE_SCHEMA(0L, 1L << 7),
+ USE_SCHEMA(0L, 1L << 4),
/** The privilege to create a table. */
- CREATE_TABLE(0L, 1L << 8),
- /** The privilege to drop a table. */
- DROP_TABLE(0L, 1L << 9),
+ CREATE_TABLE(0L, 1L << 5),
/** The privilege to write a table. */
- WRITE_TABLE(0L, 1L << 10),
+ MODIFY_TABLE(0L, 1L << 6),
Review Comment:
What operation is contained in the `MODIFY_TABLE`?
I think better to add some comments.
##########
api/src/main/java/com/datastrato/gravitino/authorization/Privilege.java:
##########
@@ -43,72 +43,52 @@ public interface Privilege {
enum Name {
/** The privilege to create a catalog. */
CREATE_CATALOG(0L, 1L),
- /** The privilege to drop a catalog. */
- DROP_CATALOG(0L, 1L << 1),
- /** The privilege to alter a catalog. */
- ALTER_CATALOG(0L, 1L << 2),
/** The privilege to use a catalog. */
- USE_CATALOG(0L, 1L << 3),
+ USE_CATALOG(0L, 1L << 2),
/** The privilege to create a schema. */
- CREATE_SCHEMA(0L, 1L << 4),
- /** The privilege to drop a schema. */
- DROP_SCHEMA(0L, 1L << 5),
- /** The privilege to alter a schema. */
- ALTER_SCHEMA(0L, 1L << 6),
+ CREATE_SCHEMA(0L, 1L << 3),
/** the privilege to use a schema. */
- USE_SCHEMA(0L, 1L << 7),
+ USE_SCHEMA(0L, 1L << 4),
/** The privilege to create a table. */
- CREATE_TABLE(0L, 1L << 8),
- /** The privilege to drop a table. */
- DROP_TABLE(0L, 1L << 9),
+ CREATE_TABLE(0L, 1L << 5),
/** The privilege to write a table. */
- WRITE_TABLE(0L, 1L << 10),
+ MODIFY_TABLE(0L, 1L << 6),
Review Comment:
Please add these comments here.
##########
api/src/main/java/org/apache/gravitino/authorization/Privilege.java:
##########
@@ -43,66 +43,52 @@ public interface Privilege {
enum Name {
/** The privilege to create a catalog. */
CREATE_CATALOG(0L, 1L),
- /** The privilege to drop a catalog. */
- DROP_CATALOG(0L, 1L << 1),
- /** The privilege to alter a catalog. */
- ALTER_CATALOG(0L, 1L << 2),
/** The privilege to use a catalog. */
- USE_CATALOG(0L, 1L << 3),
+ USE_CATALOG(0L, 1L << 2),
/** The privilege to create a schema. */
- CREATE_SCHEMA(0L, 1L << 4),
- /** The privilege to drop a schema. */
- DROP_SCHEMA(0L, 1L << 5),
- /** The privilege to alter a schema. */
- ALTER_SCHEMA(0L, 1L << 6),
+ CREATE_SCHEMA(0L, 1L << 3),
/** the privilege to use a schema. */
- USE_SCHEMA(0L, 1L << 7),
+ USE_SCHEMA(0L, 1L << 4),
/** The privilege to create a table. */
- CREATE_TABLE(0L, 1L << 8),
- /** The privilege to drop a table. */
- DROP_TABLE(0L, 1L << 9),
+ CREATE_TABLE(0L, 1L << 5),
/** The privilege to write a table. */
- WRITE_TABLE(0L, 1L << 10),
+ MODIFY_TABLE(0L, 1L << 6),
/** The privilege to read a table. */
- READ_TABLE(0L, 1L << 11),
+ SELECT_TABLE(0L, 1L << 7),
/** The privilege to create a fileset. */
- CREATE_FILESET(0L, 1L << 12),
- /** The privilege to drop a fileset. */
- DROP_FILESET(0L, 1L << 13),
+ CREATE_FILESET(0L, 1L << 8),
/** The privilege to write a fileset. */
- WRITE_FILESET(0L, 1L << 14),
+ WRITE_FILESET(0L, 1L << 9),
/** The privilege to read a fileset. */
- READ_FILESET(0L, 1L << 15),
+ READ_FILESET(0L, 1L << 10),
/** The privilege to create a topic. */
- CREATE_TOPIC(0L, 1L << 16),
- /** The privilege to drop a topic. */
- DROP_TOPIC(0L, 1L << 17),
+ CREATE_TOPIC(0L, 1L << 11),
/** The privilege to write a topic. */
- WRITE_TOPIC(0L, 1L << 18),
+ PRODUCE_TOPIC(0L, 1L << 12),
/** The privilege to read a topic. */
Review Comment:
Please update comments.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]