You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by be...@apache.org on 2024/09/20 15:59:03 UTC

(superset) branch remove-query-format created (now f35db5a633)

This is an automated email from the ASF dual-hosted git repository.

beto pushed a change to branch remove-query-format
in repository https://gitbox.apache.org/repos/asf/superset.git


      at f35db5a633 fix: don't reformat generated queries

This branch includes the following new commits:

     new f35db5a633 fix: don't reformat generated queries

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(superset) 01/01: fix: don't reformat generated queries

Posted by be...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

beto pushed a commit to branch remove-query-format
in repository https://gitbox.apache.org/repos/asf/superset.git

commit f35db5a6339c9895315fc7bbf337d334a9c5b897
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Fri Sep 20 11:58:52 2024 -0400

    fix: don't reformat generated queries
---
 superset/models/helpers.py | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/superset/models/helpers.py b/superset/models/helpers.py
index 80e66f5027..3a618cedad 100644
--- a/superset/models/helpers.py
+++ b/superset/models/helpers.py
@@ -870,10 +870,6 @@ class ExploreMixin:  # pylint: disable=too-many-public-methods
         sqlaq = self.get_sqla_query(**query_obj)
         sql = self.database.compile_sqla_query(sqlaq.sqla_query)
         sql = self._apply_cte(sql, sqlaq.cte)
-        try:
-            sql = SQLStatement(sql, engine=self.db_engine_spec.engine).format()
-        except SupersetParseError:
-            logger.warning("Unable to parse SQL to format it, passing it as-is")
 
         if mutate:
             sql = self.database.mutate_sql_based_on_config(sql)