john-bodley commented on code in PR #25785:
URL: https://github.com/apache/superset/pull/25785#discussion_r1387179066


##########
superset/models/helpers.py:
##########
@@ -875,7 +875,9 @@ def mutate_query_from_config(self, sql: str) -> str:
         """Apply config's SQL_QUERY_MUTATOR
 
         Typically adds comments to the query with context"""
-        if sql_query_mutator := config["SQL_QUERY_MUTATOR"]:
+        if (sql_query_mutator := config.get("SQL_QUERY_MUTATOR")) and not 
config.get(
+            "MUTATE_AFTER_SPLIT"
+        ):

Review Comment:
   ```suggestion
   ```



##########
superset/models/helpers.py:
##########
@@ -875,7 +875,9 @@ def mutate_query_from_config(self, sql: str) -> str:
         """Apply config's SQL_QUERY_MUTATOR
 
         Typically adds comments to the query with context"""
-        if sql_query_mutator := config["SQL_QUERY_MUTATOR"]:
+        if (sql_query_mutator := config.get("SQL_QUERY_MUTATOR")) and not 
config.get(
+            "MUTATE_AFTER_SPLIT"

Review Comment:
   ```suggestion
   ```



##########
superset/models/helpers.py:
##########
@@ -875,7 +875,9 @@ def mutate_query_from_config(self, sql: str) -> str:
         """Apply config's SQL_QUERY_MUTATOR
 
         Typically adds comments to the query with context"""
-        if sql_query_mutator := config["SQL_QUERY_MUTATOR"]:
+        if (sql_query_mutator := config.get("SQL_QUERY_MUTATOR")) and not 
config.get(

Review Comment:
   @eschutho both these keys are defined in `config.py` and thus there's no 
need to use `.get()`.



##########
superset/models/helpers.py:
##########
@@ -875,7 +875,9 @@ def mutate_query_from_config(self, sql: str) -> str:
         """Apply config's SQL_QUERY_MUTATOR
 
         Typically adds comments to the query with context"""
-        if sql_query_mutator := config["SQL_QUERY_MUTATOR"]:
+        if (sql_query_mutator := config.get("SQL_QUERY_MUTATOR")) and not 
config.get(

Review Comment:
   ```suggestion
           if (sql_query_mutator := config["SQL_QUERY_MUTATOR"]) and not 
config["MUTATE_AFTER_SPLIT"]):
   ```



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