mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 09:28:51 +00:00
presto: use the disambiguated column name
This commit is contained in:
parent
177b62ea40
commit
0ebb53994b
@ -83,7 +83,7 @@ class Presto(BaseQueryRunner):
|
||||
cursor.execute(query)
|
||||
column_tuples = [(i[0], PRESTO_TYPES_MAPPING.get(i[1], None)) for i in cursor.description]
|
||||
columns = self.fetch_columns(column_tuples)
|
||||
rows = [dict(zip(([c[0] for c in column_tuples]), r)) for i, r in enumerate(cursor.fetchall())]
|
||||
rows = [dict(zip(([c['name'] for c in columns]), r)) for i, r in enumerate(cursor.fetchall())]
|
||||
data = {'columns': columns, 'rows': rows}
|
||||
json_data = json.dumps(data, cls=JSONEncoder)
|
||||
error = None
|
||||
|
Loading…
Reference in New Issue
Block a user