You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by am...@apache.org on 2021/05/07 18:38:40 UTC
[superset] 02/06: fix: SQL Statement on QUERY_LOGGER prints none to
log (#14358)
This is an automated email from the ASF dual-hosted git repository.
amitmiran pushed a commit to branch 1.2
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 099514d3c0a31d5966de18fa21d2dc7c4e6c7512
Author: cccs-rc <62...@users.noreply.github.com>
AuthorDate: Thu May 6 10:50:19 2021 -0400
fix: SQL Statement on QUERY_LOGGER prints none to log (#14358)
(cherry picked from commit f55882e75606c107b49a270c74bb620e9d02cef6)
---
superset/sql_lab.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/superset/sql_lab.py b/superset/sql_lab.py
index 9b62f9c..cd8818e 100644
--- a/superset/sql_lab.py
+++ b/superset/sql_lab.py
@@ -228,6 +228,7 @@ def execute_sql_statement(
# Hook to allow environment-specific mutation (usually comments) to the SQL
sql = SQL_QUERY_MUTATOR(sql, user_name, security_manager, database)
try:
+ query.executed_sql = sql
if log_query:
log_query(
query.database.sqlalchemy_uri,
@@ -238,7 +239,6 @@ def execute_sql_statement(
security_manager,
log_params,
)
- query.executed_sql = sql
session.commit()
with stats_timing("sqllab.query.time_executing_query", stats_logger):
logger.debug("Query %d: Running query: %s", query.id, sql)