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 281ae45  Fix for SQL editor throwing can't deserialize 
google.cloud.bigquery._helpers.Row with BigQuery (#4071)
281ae45 is described below

commit 281ae4549518eeb659baa82e277fd0045419a340
Author: kuriancheeramelil <[email protected]>
AuthorDate: Tue Dec 19 10:52:34 2017 +0530

    Fix for SQL editor throwing can't deserialize 
google.cloud.bigquery._helpers.Row with BigQuery (#4071)
    
    * fix for SQL editor throwing cant deserialize 
google.cloud.bigquery._helpers.Row with BigQuery
    
    * linted code
    
    * disable pylint import error of bigquery row
    
    * fixed spacing issue before inline-comment
---
 superset/db_engine_specs.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/superset/db_engine_specs.py b/superset/db_engine_specs.py
index a176a25..fbda059 100644
--- a/superset/db_engine_specs.py
+++ b/superset/db_engine_specs.py
@@ -1186,6 +1186,14 @@ class BQEngineSpec(BaseEngineSpec):
             return "{}'".format(dttm.strftime('%Y-%m-%d'))
         return "'{}'".format(dttm.strftime('%Y-%m-%d %H:%M:%S'))
 
+    @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):
+            data = [r.values() for r in data]
+        return data
+
 
 class ImpalaEngineSpec(BaseEngineSpec):
     """Engine spec for Cloudera's Impala"""

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to