bito-code-review[bot] commented on code in PR #37411:
URL: https://github.com/apache/superset/pull/37411#discussion_r2757499709


##########
superset/sql_lab.py:
##########
@@ -411,6 +412,13 @@ def execute_sql_statements(  # noqa: C901
     ):
         raise SupersetDisallowedSQLFunctionException(disallowed_functions)
 
+    disallowed_tables = app.config["DISALLOWED_SQL_TABLES"].get(
+        db_engine_spec.engine,
+        set(),
+    )
+    if disallowed_tables and 
parsed_script.check_tables_present(disallowed_tables):
+        raise SupersetDisallowedSQLTableException(disallowed_tables)

Review Comment:
   <!-- Bito Reply -->
   Yes, the suggestion is valid — computing the intersection of configured 
disallowed tables with those present in the query ensures the error message 
only reports matched tables, providing precise feedback and matching the 
behavior in SQLExecutor._check_disallowed_tables.



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