View Presto row and array objects clearly in the data grid (#7625)

* feat: rough check in for Presto rows and arrays

* fix: presto arrays

* fix: return selected and expanded columns

* fix: add helper methods and unit tests

* fix: only allow exploration of selected columns

* fix: address Beto's comments and add more unit tests
This commit is contained in:
Kim Truong
2019-05-31 11:25:07 -07:00
committed by Beto Dealmeida
parent d408e30594
commit d2967340d9
6 changed files with 709 additions and 42 deletions

View File

@@ -279,10 +279,17 @@ def execute_sql_statements(
latest_partition=False)
query.end_time = now_as_float()
selected_columns = cdf.columns or []
data = cdf.data or []
all_columns, data, expanded_columns = db_engine_spec.expand_data(
selected_columns, data)
payload.update({
'status': query.status,
'data': cdf.data if cdf.data else [],
'columns': cdf.columns if cdf.columns else [],
'data': data,
'columns': all_columns,
'selected_columns': selected_columns,
'expanded_columns': expanded_columns,
'query': query.to_dict(),
})