This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new ef9e5e523d fix: KeyError 'sql' when opening a Trino virtual dataset
(#30339)
ef9e5e523d is described below
commit ef9e5e523d48d2663d217d9501b4ebe5c3da50b5
Author: Michael S. Molina <[email protected]>
AuthorDate: Thu Sep 19 17:41:08 2024 -0300
fix: KeyError 'sql' when opening a Trino virtual dataset (#30339)
---
superset/commands/sql_lab/execute.py | 3 ---
superset/sqllab/sql_json_executer.py | 2 --
2 files changed, 5 deletions(-)
diff --git a/superset/commands/sql_lab/execute.py
b/superset/commands/sql_lab/execute.py
index 0c3e33b529..001d5609db 100644
--- a/superset/commands/sql_lab/execute.py
+++ b/superset/commands/sql_lab/execute.py
@@ -17,7 +17,6 @@
# pylint: disable=too-few-public-methods, too-many-arguments
from __future__ import annotations
-import copy
import logging
from typing import Any, TYPE_CHECKING
@@ -152,8 +151,6 @@ class ExecuteSqlCommand(BaseCommand):
self._validate_access(query)
self._execution_context.set_query(query)
rendered_query =
self._sql_query_render.render(self._execution_context)
- validate_rendered_query = copy.copy(query)
- validate_rendered_query.sql = rendered_query
self._set_query_limit_if_required(rendered_query)
self._query_dao.update(
query, {"limit": self._execution_context.query.limit}
diff --git a/superset/sqllab/sql_json_executer.py
b/superset/sqllab/sql_json_executer.py
index ac9968ed6b..27483fb31c 100644
--- a/superset/sqllab/sql_json_executer.py
+++ b/superset/sqllab/sql_json_executer.py
@@ -90,7 +90,6 @@ class SynchronousSqlJsonExecutor(SqlJsonExecutorBase):
rendered_query: str,
log_params: dict[str, Any] | None,
) -> SqlJsonExecutionStatus:
- print(">>> execute <<<")
query_id = execution_context.query.id
try:
data = self._get_sql_results_with_timeout(
@@ -102,7 +101,6 @@ class SynchronousSqlJsonExecutor(SqlJsonExecutorBase):
raise
except Exception as ex:
logger.exception("Query %i failed unexpectedly", query_id)
- print(str(ex))
raise SupersetGenericDBErrorException(
utils.error_msg_from_exception(ex)
) from ex