mistercrunch commented on code in PR #34111:
URL: https://github.com/apache/superset/pull/34111#discussion_r2201812886
##########
superset/sql_lab.py:
##########
@@ -475,7 +475,9 @@ def execute_sql_statements( # noqa: C901
db.session.commit()
# Hook to allow environment-specific mutation (usually comments)
to the SQL
- query.executed_sql = database.mutate_sql_based_on_config(block)
+ query.executed_sql = database.mutate_sql_based_on_config(
+ block, is_split=config["MUTATE_AFTER_SPLIT"]
Review Comment:
What I'm thinking is that `is_split` on the line right above these comments
should probably hard coded to True or False, depending on whether the SQL at
that time is split or not.
Looking at where it executes ->
https://github.com/apache/superset/blob/5a32777dd090c840bafbec458bba91f6b36e1dba/superset/models/core.py#L646
, it only applies the logic if the parameter matches the config. Meaning the
argument is supposed to represent whether the SQL is split or not at the time
of the call.
If merging the code as is, that method would always execute since
`config["MUTATE_AFTER_SPLIT"] == 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]