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/04/12 11:20:34 UTC

[GitHub] [superset] villebro opened a new pull request, #19664: fix(sql-lab): do not replace undefined schema with empty object

villebro opened a new pull request, #19664:
URL: https://github.com/apache/superset/pull/19664

   ### SUMMARY
   The SQL Lab reducer incorrectly replaces a missing schema with an empty object, which causes the query to fail in the backend, which later breaks the whole UI and makes it impossible to enter SQL Lab again.
   
   See a few examples of what a valid schema is in this context:
   https://github.com/apache/superset/blob/3a231f6b871cdab00b9dfb6192af76cf4cf9832a/superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx#L42
   https://github.com/apache/superset/blob/3a231f6b871cdab00b9dfb6192af76cf4cf9832a/superset-frontend/src/components/DatabaseSelector/index.tsx#L96
   https://github.com/apache/superset/blob/3a231f6b871cdab00b9dfb6192af76cf4cf9832a/superset-frontend/src/components/DatabaseSelector/index.tsx#L99
   
   ### AFTER
   Now SQL Lab executes correctly even when not selecting a schema:
   <img width="1651" alt="image" src="https://user-images.githubusercontent.com/33317356/162948581-8a7f041a-6544-4135-84e6-3ea6d48a942a.png">
   
   ### BEFORE
   Previously the schema would fail to execute due to the empty object not being compatible with the column type in the metastore:
   <img width="1651" alt="image" src="https://user-images.githubusercontent.com/33317356/162949053-262308c6-b0a7-4bd6-90da-a2240147a728.png">
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue: closes #19658
   - [ ] 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 #19664: fix(sql-lab): do not replace undefined schema with empty object

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #19664:
URL: https://github.com/apache/superset/pull/19664#issuecomment-1096599049

   # [Codecov](https://codecov.io/gh/apache/superset/pull/19664?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 [#19664](https://codecov.io/gh/apache/superset/pull/19664?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3a231f6) into [master](https://codecov.io/gh/apache/superset/commit/3a231f6b871cdab00b9dfb6192af76cf4cf9832a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3a231f6) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head 3a231f6 differs from pull request most recent head f3f70e2. Consider uploading reports for the commit f3f70e2 to get more accurate results
   
   ```diff
   @@           Coverage Diff           @@
   ##           master   #19664   +/-   ##
   =======================================
     Coverage   66.42%   66.42%           
   =======================================
     Files        1681     1681           
     Lines       64467    64467           
     Branches     6607     6607           
   =======================================
     Hits        42823    42823           
     Misses      19950    19950           
     Partials     1694     1694           
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `52.66% <0.00%> (ø)` | |
   | postgres | `81.94% <0.00%> (ø)` | |
   | presto | `52.51% <0.00%> (ø)` | |
   | python | `82.28% <0.00%> (ø)` | |
   | unit | `47.71% <0.00%> (ø)` | |
   
   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.
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19664?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/19664?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 [3a231f6...f3f70e2](https://codecov.io/gh/apache/superset/pull/19664?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


[GitHub] [superset] villebro merged pull request #19664: fix(sql-lab): do not replace undefined schema with empty object

Posted by GitBox <gi...@apache.org>.
villebro merged PR #19664:
URL: https://github.com/apache/superset/pull/19664


-- 
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