villebro commented on a change in pull request #13307:
URL: https://github.com/apache/superset/pull/13307#discussion_r582679796
##########
File path: superset/connectors/sqla/models.py
##########
@@ -1465,6 +1465,12 @@ def has_extra_cache_key_calls(self, query_obj:
QueryObjectDict) -> bool:
for statement in templatable_statements:
if ExtraCache.regex.search(statement):
return True
+
+ # Always recalculate the cache keys since the SQL query mutator can
modify the
+ # query in arbitrary ways
+ if config["SQL_QUERY_MUTATOR"]:
+ return True
+
Review comment:
This can have a very adverse effect on performance - rendering the query
triggers all templated python code, which includes partition key checks etc. If
your org is using the query mutator and is applying partition checks in the
where clause, I fear this will seriously impact your DW. See our discussion
from a while ago
https://github.com/apache/superset/pull/7816#issuecomment-525403232 and a PR
that fixed the problem https://github.com/apache/superset/pull/8128
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]