john-bodley closed pull request #4590: Removing escape_sql so we dont double 

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/superset/connectors/sqla/ 
index 3b636e8fa2..ef8c68ebb3 100644
--- a/superset/connectors/sqla/
+++ b/superset/connectors/sqla/
@@ -432,8 +432,6 @@ def get_from_clause(self, template_processor=None, 
             from_sql = self.sql
             if template_processor:
                 from_sql = template_processor.process_template(from_sql)
-            if db_engine_spec:
-                from_sql = db_engine_spec.escape_sql(from_sql)
             from_sql = sqlparse.format(from_sql, strip_comments=True)
             return TextAsFrom(sa.text(from_sql), []).alias('expr_qry')
         return self.get_sqla_table()
diff --git a/superset/ b/superset/
index 73f8677293..e026ccfb39 100644
--- a/superset/
+++ b/superset/
@@ -145,11 +145,6 @@ def _allowed_file(filename):
-    @classmethod
-    def escape_sql(cls, sql):
-        """Escapes the raw SQL"""
-        return sql
     def convert_dttm(cls, target_type, dttm):
         return "'{}'".format(dttm.strftime('%Y-%m-%d %H:%M:%S'))
@@ -552,10 +547,6 @@ def adjust_database_uri(cls, uri, selected_schema=None):
             uri.database = database
         return uri
-    @classmethod
-    def escape_sql(cls, sql):
-        return re.sub(r'%%|%', '%%', sql)
     def convert_dttm(cls, target_type, dttm):
         tt = target_type.upper()


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

Reply via email to