hughhhh opened a new issue #11942:
URL: https://github.com/apache/incubator-superset/issues/11942


   A clear and concise description of what the bug is.
   
   ### Expected results
   User should be able to write a query without having to wrap all columns in 
quotations marks.
   
   ```
   SELECT 
         DATE_TRUNC('week', year) AS __timestamp,
         SUM(NY_GNP_PCAP_CD) AS "(NY_GNP_PCAP_CD)"
   FROM wb_health_population
   GROUP BY DATE_TRUNC('week', year)
   LIMIT 10000
   ```
   
   ### Actual results
   
   When writing a query to postgres and the column doesn't have quotation the 
user will receive the following error:
   
   ```
   postgresql error: column "ny_gnp_pcap_cd" does not exist
   LINE 5:       SUM(NY_GNP_PCAP_CD) AS "(NY_GNP_PCAP_CD)"
                     ^
   ```
   
   #### Screenshots
   
   If applicable, add screenshots to help explain your problem.
   
   #### How to reproduce the bug
   
   1. Go to 'sqllab'
   2. Select a postgres database
   3. Write a query with columns not wrapped in columns (see the example above)
   4. See error
   
   ### Environment
   
   (please complete the following information):
   
   - superset version: `superset version`
   - python version: `python --version`
   - node.js version: `node -v`
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [ ] I have checked the superset logs for python stacktraces and included 
it here as text if there are any.
   - [ ] I have reproduced the issue with at least the latest released version 
of superset.
   - [ ] I have checked the issue tracker for the same issue and I haven't 
found one similar.
   
   ### Additional context
   
   Add any other context about the problem here.
   


----------------------------------------------------------------
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.

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