msyavuz commented on code in PR #45681:
URL: https://github.com/apache/superset/pull/45681#discussion_r4380139501


##########
superset/models/helpers.py:
##########
@@ -3994,6 +3995,24 @@ def get_rendered_sql(
     def text(self, clause: str) -> TextClause:
         return self.db_engine_spec.get_text_clause(clause)
 
+    def _get_rls_schema(self) -> str:

Review Comment:
   Your follow-up says this is still open at 5c707e4. On non-dynamic engines, 
adhoc column, metric, WHERE and HAVING subqueries still pass `self.schema` to 
`validate_adhoc_subquery` (around lines 4197, 5133, 5214, 5274, 6003 and 6012, 
plus `connectors/sqla/models.py:1318`) instead of `_get_rls_schema()`. So 
`(SELECT MAX(col1) FROM physical)` reads the connection-default table without 
its RLS predicate, while the outer virtual SQL is now filtered.



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