rusackas opened a new pull request, #41838: URL: https://github.com/apache/superset/pull/41838
### SUMMARY closes #37609 Test-only PR — no production code changes. Issue #37609 reported that a virtual dataset's column metadata is not persisted when its query returns zero rows (e.g. a date filter that matches nothing). @hainenber could not reproduce this on a recent `master` build and suspected it had already been fixed, and the reporter never re-tested despite a nudge. This PR adds regression tests that encode the issue's repro at the unit level, proving the behavior works correctly on `master`: - `test_get_columns_description_zero_row_query` — executes a real query against a real (SQLite) database where the `WHERE` clause matches zero rows, and asserts that `get_columns_description` still derives the column metadata (`id`, `name`, `event_date`) from the cursor description. No mocked cursors — this exercises the raw connection → `SupersetResultSet.columns` path end to end. - `test_get_virtual_table_metadata_zero_row_query` — same zero-row query through `get_virtual_table_metadata`, the entry point used by dataset metadata refresh / "Sync columns from source". Both tests pass against current `master`, confirming the issue is resolved. If a regression ever reintroduces the zero-row metadata loss, these tests will catch it. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A — test-only change. ### TESTING INSTRUCTIONS ```bash pytest tests/unit_tests/connectors/sqla/utils_test.py -x -q ``` ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> - [x] Has associated issue: closes #37609 - [ ] 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 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
