sfirke opened a new issue, #35493:
URL: https://github.com/apache/superset/issues/35493

   ### Bug description
   
   1. Create a dataset where a column has a space in the name
   2. Put it on the X-axis of a bar chart.
   
   Chart will fail to render with `Unable to parse SQL`. Error logs:
   ```
   sqlglot.errors.ParseError: Invalid expression / Unexpected token. Line 1, 
Col: 32.
     SELECT TOP 100 Test AS Column AS [Test Column], COUNT(*) AS count 
   FROM dbo.test_table_with_spaces GROUP BY Test AS Column ORDER BY 
   ```
   
   A column name with a space CAN go in a Dimension, which means this isn't a 
problem for e..g, pie charts. This seems to be isolated to the x-axis.
   
   ### Screenshots/recordings
   
   **Works in 4.1.3**
   
   <img width="1128" height="757" alt="Image" 
src="https://github.com/user-attachments/assets/62f75b7d-cfc5-435a-94b7-cc5084269496";
 />
   
   **Broken in 6.0.0rc2**
   
   <img width="1955" height="792" alt="Image" 
src="https://github.com/user-attachments/assets/81402a85-ee3d-4ff8-a68f-88cb712b8b66";
 />
   
   _Other_
   I created the dataset with
   ```
   SELECT 1 AS [Test Column], 1 AS [Other_Column]
   INTO test_table_with_spaces
   ```
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   Not applicable
   
   ### Node version
   
   Not applicable
   
   ### Browser
   
   Firefox
   
   ### Additional context
   
   _No response_
   
   ### 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]

Reply via email to