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: [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]
