Skip to content

Commit

Permalink
Merge pull request #235 from alison985/m10_rc
Browse files Browse the repository at this point in the history
More Athena cases for map() and row()
  • Loading branch information
alison985 authored Aug 31, 2017
2 parents 897eda5 + a7a001d commit c14dc1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion redash/query_runner/athena.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,10 @@ def get_schema(self, get_stats=False):

if row['extra_info'] == 'partition key':
schema[table_name]['columns'].append('[P] ' + row['column_name'] + ' (' + row['column_type'] + ')')
elif row['column_type'][0:3] == 'row(' and row['column_type'][0:3] == 'map(':
elif row['column_type'] == 'integer' or row['column_type'] == 'varchar' or row['column_type'] == 'timestamp' or row['column_type'] == 'boolean' or row['column_type'] == 'bigint':
schema[table_name]['columns'].append(row['column_name'] + ' (' + row['column_type'] + ')')
elif row['column_type'][0:2] == 'row' and row['column_type'][0:2] == 'map':
schema[table_name]['columns'].append(row['column_name'] + ' (row or map)')
else:
schema[table_name]['columns'].append(row['column_name'])

Expand Down

0 comments on commit c14dc1c

Please sign in to comment.