Painyjames opened a new pull request #19432:
URL: https://github.com/apache/superset/pull/19432


   …ssue
   
   A `Cannot convert object to primitive value` error appears in the developer 
console when trying to format the data coming from Presto. This issue causes 
the SQL Lab to crash. This can be sorted by stringifying the row data.
   
   ### SUMMARY
   The SQL Lab crashes when data coming from Presto contains non primitive 
values. This fix basically catches the exception that occurs and recovers by 
formatting the row data using `JSON.stringify`. It does the trick in our case.
   We also had a look at fixing this on the [presto db engine 
spec](https://github.com/apache/superset/blob/master/superset/db_engine_specs/presto.py)
 but couldn't really fix it over there.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   <img width="845" alt="Screenshot 2022-03-30 at 12 56 53" 
src="https://user-images.githubusercontent.com/1241373/160829178-d891e71f-b597-484d-a230-7ca5eed0dce0.png";>
   
   ### TESTING INSTRUCTIONS
   I guess this is hard to test but, in our case, we have a Presto datasource 
that returns nested data that blows up the SQL Lab when it's getting formatted 
in a tabulated way.
   
   ### ADDITIONAL INFORMATION
   - [x] Has associated issue: https://github.com/apache/superset/issues/11295
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] 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.

To unsubscribe, e-mail: [email protected]

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