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

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


The following commit(s) were added to refs/heads/master by this push:
     new 4a6adb2  Check class name string instead of checking the instance 
(#4404)
4a6adb2 is described below

commit 4a6adb2f27dfcae26b06f1fb28c333759923a8ee
Author: mxmzdlv <maxim.zudi...@gmail.com>
AuthorDate: Mon Feb 12 21:16:42 2018 -0800

    Check class name string instead of checking the instance (#4404)
    
    This fixes an issue with the newer Google's DBAPI library, which moved Row 
from google.cloud.bigquery._helper.Row to google.cloud.bigquery.Row, causing 
ImportError
---
 superset/db_engine_specs.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/superset/db_engine_specs.py b/superset/db_engine_specs.py
index b961c03..f0e7c67 100644
--- a/superset/db_engine_specs.py
+++ b/superset/db_engine_specs.py
@@ -1200,8 +1200,7 @@ class BQEngineSpec(BaseEngineSpec):
     @classmethod
     def fetch_data(cls, cursor, limit):
         data = super(BQEngineSpec, cls).fetch_data(cursor, limit)
-        from google.cloud.bigquery._helpers import Row  # pylint: 
disable=import-error
-        if len(data) != 0 and isinstance(data[0], Row):
+        if len(data) != 0 and type(data[0]).__name__ == 'Row':
             data = [r.values() for r in data]
         return data
 

-- 
To stop receiving notification emails like this one, please contact
maximebeauche...@apache.org.

Reply via email to