Arunodoy18 opened a new pull request, #37570:
URL: https://github.com/apache/superset/pull/37570
### SUMMARY
Fixes failures caused by SQL queries that return unnamed result columns
(e.g. `SELECT COUNT(*) FROM my_table`), which previously caused errors in
SQL Lab, alerts, and dimension creation.
Superset assumed all result columns had explicit names. Some databases
(including MSSQL) return unnamed columns for valid SQL expressions.
This change normalizes unnamed result columns at the shared result-set
handling layer by assigning stable, deterministic names, while preserving
explicitly named columns unchanged.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Not applicable.
### TESTING INSTRUCTIONS
**Automated testing:**
- Added tests validating that:
- Unnamed expression columns are normalized to non-empty, stable names
- Explicit column aliases (e.g. `AS total`) are preserved unchanged
- Downstream consumers relying on column metadata do not fail
**Manual verification (optional):**
1. Run a query like `SELECT COUNT(*) FROM my_table` in SQL Lab
2. Verify the result renders correctly without errors
3. Use the query in an alert or dimension and confirm no failure occurs
### ADDITIONAL INFORMATION
- [x] Has associated issue: Fixes #23848
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in SIP-59)
- [ ] 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]