codeant-ai-for-open-source[bot] commented on PR #38452:
URL: https://github.com/apache/superset/pull/38452#issuecomment-4053163365

   ## **Sequence Diagram**
   
   This PR centralizes RLS clause processing through the select-expression 
pipeline and strengthens SQL AST checks with recursive traversal. It ensures 
nested subqueries in RLS predicates and nested mutating statements in SQL Lab 
are reliably detected across dialects.
   
   ```mermaid
   sequenceDiagram
       participant Admin
       participant RLSCommand
       participant SQLValidator
       participant SQLParser
       participant RLSEngine
       participant Analyst
       participant SQLLab
   
       Admin->>RLSCommand: Submit RLS clause
       RLSCommand->>SQLValidator: Validate clause for each target table
       SQLValidator->>SQLParser: Strip template tags and parse predicate AST
       SQLParser-->>SQLValidator: Recursive subquery detection result
       SQLValidator->>RLSEngine: Apply RLS to nested subqueries when policy 
allows
       RLSCommand-->>Admin: Save or reject rule based on policy
   
       Analyst->>SQLLab: Execute query
       SQLLab->>SQLParser: Recursively check for mutating statements
       SQLParser-->>SQLLab: Flag nested DML and CTE mutations
   ```
   
   ---
   *Generated by [CodeAnt AI](https://codeant.ai)*
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to