betodealmeida opened a new pull request #10456:
URL: https://github.com/apache/incubator-superset/pull/10456


   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   
   When [serializing nested types we convert them to 
string](https://github.com/apache/incubator-superset/blob/0017b61f51b83a19c03b698f83bdeeeb0ec5685d/superset/result_set.py#L119-L124),
 which breaks the `expand_data` in Presto.
   
   I added a check in `expand_data` so that when the data associated with a 
nested column (types `ARRAY` and `ROW`) is a string, it gets deserialized back 
into the original data.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   A Presto query selecting an `ARRAY` and a `ROW` without the 
`PRESTO_EXPAND_DATA` feature flag:
   
   ![Screen Shot 2020-07-28 at 12 41 30 
PM](https://user-images.githubusercontent.com/1534870/88713305-f080c500-d0cf-11ea-83f6-767b59977c4e.png)
   
   With the feature enabled, data should be displayed similar to how BigQuery 
does, with arrays expanded into multiple lines, and rows expanded into multiple 
columns. This is currently broken:
   
   ![Screen Shot 2020-07-28 at 12 41 33 
PM](https://user-images.githubusercontent.com/1534870/88713375-10b08400-d0d0-11ea-92be-067ed2ba129d.png)
   
   This PR fixes the problem, and the data gets expanded correctly:
   
   ![Screen Shot 2020-07-28 at 12 41 36 
PM](https://user-images.githubusercontent.com/1534870/88713424-21f99080-d0d0-11ea-809d-cc84fa6e356d.png)
   
   ### TEST PLAN
   <!--- What steps should be taken to verify the changes -->
   
   Tested with a simple query (see above), and added a unit test covering the 
problem.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to