You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/03/30 12:04:21 UTC
[GitHub] [superset] Painyjames opened a new pull request #19432: fix(sql-lab): recover from Cannot convert object to primitive value i…
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] commented on pull request #19432: fix(sql-lab): recover from Cannot convert object to primitive value i…
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #19432:
URL: https://github.com/apache/superset/pull/19432#issuecomment-1083189213
# [Codecov](https://codecov.io/gh/apache/superset/pull/19432?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#19432](https://codecov.io/gh/apache/superset/pull/19432?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a86d850) into [master](https://codecov.io/gh/apache/superset/commit/fa35109bf2a416462e3c83f527aa82c20b67818d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (fa35109) will **decrease** coverage by `0.00%`.
> The diff coverage is `50.00%`.
```diff
@@ Coverage Diff @@
## master #19432 +/- ##
==========================================
- Coverage 66.59% 66.58% -0.01%
==========================================
Files 1670 1670
Lines 63888 63891 +3
Branches 6510 6510
==========================================
+ Hits 42544 42545 +1
- Misses 19654 19657 +3
+ Partials 1690 1689 -1
```
| Flag | Coverage Δ | |
|---|---|---|
| javascript | `51.32% <50.00%> (-0.01%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/19432?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [superset-frontend/src/utils/common.js](https://codecov.io/gh/apache/superset/pull/19432/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2NvbW1vbi5qcw==) | `86.66% <50.00%> (-2.81%)` | :arrow_down: |
| [...nts/controls/DateFilterControl/DateFilterLabel.tsx](https://codecov.io/gh/apache/superset/pull/19432/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EYXRlRmlsdGVyQ29udHJvbC9EYXRlRmlsdGVyTGFiZWwudHN4) | `41.41% <0.00%> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19432?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19432?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [fa35109...a86d850](https://codecov.io/gh/apache/superset/pull/19432?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org