lukegranto23 commented on code in PR #45089:
URL: https://github.com/apache/superset/pull/45089#discussion_r4221256842
##########
superset/sql/parse.py:
##########
@@ -1029,6 +1029,19 @@ class SQLStatement(BaseSQLStatement[exp.Expression]):
# last value, so it is intentionally not listed.)
"SETVAL",
"NEXTVAL",
+ # dblink functions open a separate connection and auto-commit,
+ # so writes persist even when the outer transaction is read-only.
+ "DBLINK",
Review Comment:
Done in 50f3142. Added dblink_connect_u, dblink_send_query, and
dblink_connect to _MUTATING_FUNCTION_NAMES in parse.py. Added 13 parametrized
cases to test_is_mutating_postgres_function_and_select_into covering all the
dblink variants plus pg_cancel_backend, pg_reload_conf, pg_stat_reset,
pg_switch_wal, pg_logical_emit_message, pg_create_restore_point,
pg_drop_replication_slot, and pg_rotate_logfile. Also added a test in
test_estimate.py that runs the new names against the real
DISALLOWED_SQL_FUNCTIONS and expects SupersetDisallowedSQLFunctionException.
--
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]