You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rusackas (via GitHub)" <gi...@apache.org> on 2026/05/15 01:56:39 UTC
[PR] test(sql-parser): pin quoted identifiers with spaces are not subqueries (#32541, #32684) [superset]
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] test(sql-parser): pin quoted identifiers with spaces are not subqueries (#32541, #32684) [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #40143:
URL: https://github.com/apache/superset/pull/40143
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] test(sql-parser): pin quoted identifiers with spaces are not subqueries (#32541, #32684) [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #40143:
URL: https://github.com/apache/superset/pull/40143#issuecomment-4456217899
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] test(sql-parser): pin quoted identifiers with spaces are not subqueries (#32541, #32684) [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #40143:
URL: https://github.com/apache/superset/pull/40143#issuecomment-4456232661
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/40143?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 55.37%. Comparing base ([`2b71d96`](https://app.codecov.io/gh/apache/superset/commit/2b71d964cc32c7a99ef30398ccdef2d4a91df86e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`032fddf`](https://app.codecov.io/gh/apache/superset/commit/032fddf1d6767c9516b44ace973609ddb88d9454?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
> :exclamation: There is a different number of reports uploaded between BASE (2b71d96) and HEAD (032fddf). Click for more details.
>
> <details><summary>HEAD has 115 uploads less than BASE</summary>
>
>| Flag | BASE (2b71d96) | HEAD (032fddf) |
>|------|------|------|
>|hive|10|1|
>|python|99|2|
>|presto|10|1|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #40143 +/- ##
==========================================
- Coverage 64.17% 55.37% -8.80%
==========================================
Files 2590 2590
Lines 138087 138087
Branches 32039 32039
==========================================
- Hits 88615 76465 -12150
- Misses 47947 60961 +13014
+ Partials 1525 661 -864
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/40143/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [hive](https://app.codecov.io/gh/apache/superset/pull/40143/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `39.47% <ø> (ø)` | |
| [mysql](https://app.codecov.io/gh/apache/superset/pull/40143/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [postgres](https://app.codecov.io/gh/apache/superset/pull/40143/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [presto](https://app.codecov.io/gh/apache/superset/pull/40143/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `41.16% <ø> (ø)` | |
| [python](https://app.codecov.io/gh/apache/superset/pull/40143/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `41.23% <ø> (-19.47%)` | :arrow_down: |
| [sqlite](https://app.codecov.io/gh/apache/superset/pull/40143/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unit](https://app.codecov.io/gh/apache/superset/pull/40143/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/superset/pull/40143?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org