willbarrett commented on a change in pull request #13153:
URL: https://github.com/apache/superset/pull/13153#discussion_r577134151
##########
File path: superset/db_engine_specs/base.py
##########
@@ -933,6 +933,9 @@ def execute(cls, cursor: Any, query: str, **kwargs: Any) ->
None:
:param kwargs: kwargs to be passed to cursor.execute()
:return:
"""
+ if not cls.allows_sql_comments:
+ query = sql_parse.ParsedQuery(query).strip_comments()
Review comment:
I seem to remember that parsing the SQL statements is computationally
intensive - would it make sense to add this to the `process_statement` method
instead to avoid an additional parsing pass on the query?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]