lowrykun opened a new issue, #32541:
URL: https://github.com/apache/superset/issues/32541
### Bug description
I'm experiencing an issue while using a view with column names aliased with
multiple spaces. I'm using 4.1.1
For example, if I create the following MySQL view, when I add 'Answer
Created Time' to my dataset, even as a column in raw table, I get "Error:
Custom SQL fields cannot contain sub-queries." Using 'Correction Time' works
fine.
```
select
a.created_at as "Answer Created Time",
ac.created_at as "Correction Time"
from
answers a
left join answer_corrections ac ON a.id=ac.answer_id
```
But when I change my view to be snake_case, then everything works as
expected:
```
select
a.created_at as answer_created_time,
ac.created_at as correction_time
from
answers a
left join answer_corrections ac ON a.id=ac.answer_id
```
Clearly this is sub-optimal because then I have to add a label to each
column to have it appear in Title Case.
### Screenshots/recordings
_No response_
### Superset version
4.1.1
### Python version
3.9
### Node version
16
### Browser
Chrome
### Additional context
`{"source": "sqlLab", "ts": 1741360907834, "event_name": "load_chart",
"slice_id": 0, "has_err": true, "error_details": "Custom SQL fields cannot
contain sub-queries.", "datasource": "27__table", "start_offset": 174522,
"duration": 57, "event_type": "timing", "trigger_event":
"8rTWIoP9Fhd0V0xFl1ZbD"}`
### Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to
my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug
report.
- [x] I have checked Superset's logs for errors and if I found a relevant
Python stacktrace, I included it here as text in the "additional context"
section.
--
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]