roryqi opened a new pull request, #13478:
URL: https://github.com/apache/gravitino/pull/13478

   ### What changes were proposed in this pull request?
   
   - Add an ANTLR grammar for the `restricted-rego-v1` expression profile.
   - Add an unresolved expression tree and parser facade for row filters and 
context-only mask conditions.
   - Validate allowlisted operand shapes, precedence, Unicode, exact numeric 
literals, negative zero, and resource limits.
   - Add ANTLR generation to the API module build.
   
   ### Why are the changes needed?
   
   Read-restriction policies need a deterministic, fail-closed parser that 
accepts only the supported expression subset. A general Rego parser would 
accept unsupported modules, assignments, comprehensions, functions, and other 
constructs.
   
   Fix: N/A
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. It adds Java APIs for parsing `restricted-rego-v1` row-filter 
expressions and context-only mask conditions. It does not enable 
read-restriction enforcement by itself.
   
   ### How was this patch tested?
   
   - Added 53 parser tests covering syntax, precedence, operand validation, 
context-only conditions, Unicode and escaping, negative zero, depth, and 
resource limits.
   - Ran `./gradlew :api:build`.
   


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