rusackas opened a new pull request, #40143: URL: https://github.com/apache/superset/pull/40143
### SUMMARY This is a **test-only PR** opened as a TDD-style validation of issues #32541 and #32684 (the same bug reported twice). Both issues report an opaque \`Custom SQL fields cannot contain sub-queries.\` error when a user adds a column whose name contains spaces (or accents, slashes, dots) to a chart — e.g. \`"Adresse E-mail"\` (Postgres) or \`\`\`Answer Created Time\`\`\` (MySQL). Snake-case aliases worked; multi-word display names did not. The check that raises that error is \`parsed_statement.has_subquery()\` in \`superset/models/helpers.py:206\`. This PR adds a parameterized regression test on \`SQLStatement.has_subquery()\` covering: - Postgres double-quoted identifiers with spaces, accents, slashes, dots - MySQL backtick-quoted identifiers with spaces ### How to interpret CI - **CI green** → quoted identifiers are no longer misclassified as subqueries; merging closes #32541 and #32684 and locks in the regression guard. - **CI red** → bug is still live in at least one of the cases. Likely fix: in \`superset/sql/parse.py\`, \`SQLStatement.has_subquery()\` should restrict its subquery-detection traversal so a bare quoted identifier in expression position doesn't trip the check. ### TESTING INSTRUCTIONS \`\`\`bash pytest tests/unit_tests/sql/parse_tests.py::test_quoted_column_name_with_spaces_is_not_subquery -v \`\`\` ### ADDITIONAL INFORMATION - [ ] Has associated issue: closes #32541, closes #32684 - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration - [ ] 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]
