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

   ### What changes were proposed in this pull request?
   
   Replace the unreleased restricted Rego parser with `restricted-sql-v1`, 
following #14233.
   
   - Parse typed parameter and return declarations, SQL predicates, 
searched/simple `CASE`, and allowlisted functions.
   - Validate declared types, every result branch, exact numeric and temporal 
literals, identifiers, and source resource limits on policy creation and 
content updates.
   - Preserve `CASE` and SQL nulls in the unresolved AST for subsequent binding 
and enforcement.
   - Remove the Rego implementation and its tests without a compatibility 
layer; update API documentation, OpenAPI, design documentation, and policy/DTO 
tests.
   
   ### Why are the changes needed?
   
   Read-restriction policies need the typed SQL authoring contract proposed in 
#14233 instead of the previous Rego syntax.
   
   Related to #13719.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Row filters and column masks now require complete SQL definitions, for 
example `(region STRING) RETURNS BOOLEAN -> region = 'US'` and `(value STRING) 
RETURNS STRING -> show_last_4(value)`. Rego expressions are rejected.
   
   This change covers parsing and static validation. Schema/context binding, 
target nullability validation, evaluation, and Iceberg enforcement remain 
separate work.
   
   ### How was this patch tested?
   
   - 199 related tests passed: 169 SQL parser cases and 30 policy-manager, 
entity, API-content, and DTO cases.
   - `:api:spotlessApply`, `:common:spotlessApply`, `:core:spotlessApply` and 
corresponding `spotlessCheck` tasks.
   - `./gradlew :docs:build :api:javadoc :core:javadoc`.
   - `git diff --cached --check`.
   


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