This is an automated email from the ASF dual-hosted git repository.

dpgaspar pushed a commit to branch 0.35
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git

commit bc196b4b156a2fab86d4c49cfa4cd40429d2cb61
Author: Daniel Vaz Gaspar <[email protected]>
AuthorDate: Fri Nov 15 09:25:23 2019 +0000

    [druid] Fix, pydruid forced dependency (#8566)
    
    * [druid] Fix, forced pydruid dependency
    
    * [druid] Fix, more type annotation that force pydruid dependency
---
 superset/connectors/druid/models.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/superset/connectors/druid/models.py 
b/superset/connectors/druid/models.py
index af68f10..8165351 100644
--- a/superset/connectors/druid/models.py
+++ b/superset/connectors/druid/models.py
@@ -167,7 +167,7 @@ class DruidCluster(Model, AuditMixinNullable, ImportMixin):
         base_url = self.get_base_url(self.broker_host, self.broker_port)
         return f"{base_url}/{self.broker_endpoint}"
 
-    def get_pydruid_client(self) -> PyDruid:
+    def get_pydruid_client(self) -> "PyDruid":
         cli = PyDruid(
             self.get_base_url(self.broker_host, self.broker_port), 
self.broker_endpoint
         )
@@ -829,7 +829,7 @@ class DruidDatasource(Model, BaseDatasource):
         return granularity
 
     @staticmethod
-    def get_post_agg(mconf: Dict) -> Postaggregator:
+    def get_post_agg(mconf: Dict) -> "Postaggregator":
         """
         For a metric specified as `postagg` returns the
         kind of post aggregation for pydruid.
@@ -1441,7 +1441,7 @@ class DruidDatasource(Model, BaseDatasource):
         return (col, extraction_fn)
 
     @classmethod
-    def get_filters(cls, raw_filters, num_cols, columns_dict) -> Filter:
+    def get_filters(cls, raw_filters, num_cols, columns_dict) -> "Filter":
         """Given Superset filter data structure, returns pydruid Filter(s)"""
         filters = None
         for flt in raw_filters:
@@ -1570,7 +1570,7 @@ class DruidDatasource(Model, BaseDatasource):
 
         return filters
 
-    def _get_having_obj(self, col: str, op: str, eq: str) -> Having:
+    def _get_having_obj(self, col: str, op: str, eq: str) -> "Having":
         cond = None
         if op == "==":
             if col in self.column_names:
@@ -1584,7 +1584,7 @@ class DruidDatasource(Model, BaseDatasource):
 
         return cond
 
-    def get_having_filters(self, raw_filters: List[Dict]) -> Having:
+    def get_having_filters(self, raw_filters: List[Dict]) -> "Having":
         filters = None
         reversed_op_map = {"!=": "==", ">=": "<", "<=": ">"}
 

Reply via email to