rusackas opened a new pull request, #42731: URL: https://github.com/apache/superset/pull/42731
### SUMMARY Adds a TDD/regression test for #39328: SAP HANA is mapped to the Postgres sqlglot dialect (`superset/sql/parse.py`), and Postgres's generator uppercases quoted identifiers that mix case, e.g. `"zbw.10_001/INVENTORY"` becomes `"ZBW.10_001/INVENTORY"`. HANA calculation-view table names are case-sensitive, so the re-cased identifier no longer resolves and SQL Lab fails with `invalid table name: Could not find table/view ...` even though the user's original query was valid. This confirms dosubot's root-cause theory from the issue thread and pins it at the level Superset actually formats SQL before sending it to the engine (`SQLStatement(sql, engine="hana").format()`), not just raw `sqlglot`. This PR is test-only. The test is currently **red**, documenting the live bug — it does not fix it. A real fix likely needs either a HANA-specific sqlglot dialect (mirroring the Pinot dialect Superset already carries) or a change to the HANA dialect mapping, as dosubot outlined. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A — backend-only test. ### TESTING INSTRUCTIONS ``` pytest tests/unit_tests/sql/parse_tests.py -k test_format_hana_preserves_quoted_identifier_casing ``` Currently fails, reproducing the reported casing bug. ### ADDITIONAL INFORMATION - [x] Has associated issue: #39328 - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration - [ ] 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]
