Skip to content

Commit

Permalink
fix: don't reformat generated queries
Browse files Browse the repository at this point in the history
  • Loading branch information
betodealmeida committed Sep 20, 2024
1 parent 038ef32 commit f35db5a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions superset/models/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,10 +870,6 @@ def get_query_str_extended(
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)
Expand Down

0 comments on commit f35db5a

Please sign in to comment.