This is an automated email from the ASF dual-hosted git repository.
beto pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 4496748cd9 chore: update Druid (#22067)
4496748cd9 is described below
commit 4496748cd942b037a9e497edc336bd3e3d48717a
Author: Beto Dealmeida <[email protected]>
AuthorDate: Tue Nov 8 15:03:58 2022 -0800
chore: update Druid (#22067)
---
requirements/development.txt | 2 +-
setup.py | 2 +-
superset/db_engine_specs/druid.py | 8 +-------
superset/db_engine_specs/trino.py | 2 +-
superset/models/core.py | 4 ++--
superset/views/core.py | 2 +-
6 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/requirements/development.txt b/requirements/development.txt
index 9990012ab3..1bce530eab 100644
--- a/requirements/development.txt
+++ b/requirements/development.txt
@@ -78,7 +78,7 @@ pure-eval==0.2.2
# via stack-data
pure-sasl==0.6.2
# via thrift-sasl
-pydruid==0.6.2
+pydruid==0.6.5
# via apache-superset
pygments==2.12.0
# via ipython
diff --git a/setup.py b/setup.py
index cad76a9572..a3c7407f96 100644
--- a/setup.py
+++ b/setup.py
@@ -141,7 +141,7 @@ setup(
"db2": ["ibm-db-sa>=0.3.5, <0.4"],
"dremio": ["sqlalchemy-dremio>=1.1.5, <1.3"],
"drill": ["sqlalchemy-drill==0.1.dev"],
- "druid": ["pydruid>=0.6.1,<0.7"],
+ "druid": ["pydruid>=0.6.5,<0.7"],
"solr": ["sqlalchemy-solr >= 0.2.0"],
"elasticsearch": ["elasticsearch-dbapi>=0.2.9, <0.3.0"],
"exasol": ["sqlalchemy-exasol >= 2.4.0, <3.0"],
diff --git a/superset/db_engine_specs/druid.py
b/superset/db_engine_specs/druid.py
index 1484429baf..6cdc9f85e3 100644
--- a/superset/db_engine_specs/druid.py
+++ b/superset/db_engine_specs/druid.py
@@ -19,7 +19,6 @@ import logging
from datetime import datetime
from typing import Any, Dict, List, Optional, Type, TYPE_CHECKING
-from sqlalchemy import types
from sqlalchemy.engine.reflection import Inspector
from superset import is_feature_enabled
@@ -131,16 +130,11 @@ class DruidEngineSpec(BaseEngineSpec):
"""
Update the Druid type map.
"""
- # pylint: disable=import-outside-toplevel
- from pydruid.db.sqlalchemy import type_map
-
- type_map["complex<hllsketch>"] = types.BLOB
-
return super().get_columns(inspector, table_name, schema)
@classmethod
def get_dbapi_exception_mapping(cls) -> Dict[Type[Exception],
Type[Exception]]:
- # pylint: disable=import-error,import-outside-toplevel
+ # pylint: disable=import-outside-toplevel
from requests import exceptions as requests_exceptions
return {
diff --git a/superset/db_engine_specs/trino.py
b/superset/db_engine_specs/trino.py
index 490a36ab2b..c62a9d58b4 100644
--- a/superset/db_engine_specs/trino.py
+++ b/superset/db_engine_specs/trino.py
@@ -224,7 +224,7 @@ class TrinoEngineSpec(PrestoBaseEngineSpec):
@classmethod
def get_dbapi_exception_mapping(cls) -> Dict[Type[Exception],
Type[Exception]]:
- # pylint: disable=import-error,import-outside-toplevel
+ # pylint: disable=import-outside-toplevel
from requests import exceptions as requests_exceptions
return {
diff --git a/superset/models/core.py b/superset/models/core.py
index 4985ecf9f8..86b9eb1bde 100755
--- a/superset/models/core.py
+++ b/superset/models/core.py
@@ -563,7 +563,7 @@ class Database(
database=self, inspector=self.inspector, schema=schema
)
return [(table, schema) for table in tables]
- except Exception as ex: # pylint: disable=broad-except
+ except Exception as ex:
raise self.db_engine_spec.get_dbapi_mapped_exception(ex)
@cache_util.memoized_func(
@@ -593,7 +593,7 @@ class Database(
database=self, inspector=self.inspector, schema=schema
)
return [(view, schema) for view in views]
- except Exception as ex: # pylint: disable=broad-except
+ except Exception as ex:
raise self.db_engine_spec.get_dbapi_mapped_exception(ex)
@cache_util.memoized_func(
diff --git a/superset/views/core.py b/superset/views/core.py
index 353671ef01..cc1865452a 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -327,7 +327,7 @@ class Superset(BaseSupersetView): # pylint:
disable=too-many-public-methods
@has_access
@event_logger.log_this
@expose("/approve", methods=["POST"])
- def approve(self) -> FlaskResponse: # pylint:
disable=too-many-locals,no-self-use
+ def approve(self) -> FlaskResponse: # pylint: disable=too-many-locals
def clean_fulfilled_requests(session: Session) -> None:
for dar in session.query(DAR).all():
datasource = DatasourceDAO.get_datasource(