jerryshao commented on code in PR #12628:
URL: https://github.com/apache/gravitino/pull/12628#discussion_r4255234509


##########
docs/open-api/policies.yaml:
##########
@@ -594,7 +594,7 @@ components:
           minItems: 1
           items:
             type: string
-            enum: [ "CATALOG", "SCHEMA", "TABLE", "FILESET", "TOPIC", "MODEL", 
"VIEW", "FUNCTION" ]
+            enum: [ "CATALOG", "SCHEMA", "TABLE", "FILESET", "TOPIC", "MODEL", 
"SEMANTIC_MODEL", "VIEW", "FUNCTION" ]

Review Comment:
   [Nit] While you are extending this list: it belongs to `PolicyContentBase`, 
which every policy content type inherits (docs/open-api/policies.yaml:581-597), 
and it still omits `COLUMN`. `ColumnMaskContent.supportedObjectTypes()` returns 
`{TABLE, COLUMN}` 
(api/src/main/java/org/apache/gravitino/policy/ColumnMaskContent.java:32-33), 
so a `system_column_mask` policy response carries a value the documented enum 
rejects, and `docs/policies.md` - edited in the same commit - lists `COLUMN` 
among the lookup targets. Adding `COLUMN` alongside `SEMANTIC_MODEL` would make 
the schema match the code. Nothing else constrains the set: 
`PolicyContent.validate()` only checks that it is non-empty 
(api/src/main/java/org/apache/gravitino/policy/PolicyContent.java:55-58).
   
   Verified by: reading `ColumnMaskContent` and the `PolicyContentBase` schema 
in this run, and confirming with `git diff -U0 origin/main...HEAD -- 
docs/open-api/policies.yaml` that line 597 is the line this PR changes.



-- 
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]

Reply via email to