mirror of
https://github.com/apache/superset.git
synced 2026-04-26 03:24:53 +00:00
chore: remove sqlparse (#33564)
This commit is contained in:
@@ -57,11 +57,11 @@ from sqlalchemy.sql import literal_column, quoted_name, text
|
||||
from sqlalchemy.sql.expression import ColumnClause, Select, TextClause
|
||||
from sqlalchemy.types import TypeEngine
|
||||
|
||||
from superset import db, sql_parse
|
||||
from superset import db
|
||||
from superset.constants import QUERY_CANCEL_KEY, TimeGrain as TimeGrainConstants
|
||||
from superset.databases.utils import get_table_metadata, make_url_safe
|
||||
from superset.errors import ErrorLevel, SupersetError, SupersetErrorType
|
||||
from superset.exceptions import DisallowedSQLFunction, OAuth2Error, OAuth2RedirectError
|
||||
from superset.exceptions import OAuth2Error, OAuth2RedirectError
|
||||
from superset.sql.parse import (
|
||||
BaseSQLStatement,
|
||||
LimitMethod,
|
||||
@@ -1767,14 +1767,6 @@ class BaseEngineSpec: # pylint: disable=too-many-public-methods
|
||||
:param kwargs: kwargs to be passed to cursor.execute()
|
||||
:return:
|
||||
"""
|
||||
if not cls.allows_sql_comments:
|
||||
query = sql_parse.strip_comments_from_sql(query, engine=cls.engine)
|
||||
disallowed_functions = current_app.config["DISALLOWED_SQL_FUNCTIONS"].get(
|
||||
cls.engine, set()
|
||||
)
|
||||
if sql_parse.check_sql_functions_exist(query, disallowed_functions, cls.engine):
|
||||
raise DisallowedSQLFunction(disallowed_functions)
|
||||
|
||||
if cls.arraysize:
|
||||
cursor.arraysize = cls.arraysize
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user