antonio-tg opened a new issue, #31307: URL: https://github.com/apache/superset/issues/31307
### Bug description I just upgraded from version 2.1.3 to 4.1.1 and everything looks great, except that I have problems with some very particular queries, queries like for example: select lpad(cast(field as text),4,'0') as "Original_field" from schema.table These queries worked without problems in superset 2.1.3 and not being able to execute them has made my users go crazy because they have hundreds of queries with the same problem, if I remove the double quotes the query runs without problems, but this is unacceptable for my users because their queries generate tables that in turn are used in other queries which would force them to rework a lot. I just upgraded from version 2.1.3 to 4.1.1 and everything looks great, except that I have problems with some very particular queries, queries like for example: select lpad(cast(field as text),4,'0') as "Original_field" from schema.table These queries worked without problems in superset 2.1.3 and not being able to execute them has made my users go crazy since they have hundreds of queries with the same problem, if I remove the double quotes the query runs without problems, but this is unacceptable for my users since their queries generate tables that in turn are used in other queries which would force them to rework a lot. This is what the logs show me: 2024-12-05 16:20:26,759:WARNING:superset.sql_parse:Unable to parse SQL (Dialects.POSTGRES): Template(body=[Output(nodes=[TemplateData(data='select lpad(cast(field as text),4,\'0\') as "Original_field"\nfrom schema.table')])]) Cabe mencionar que esto solo ocurre si al rol se le dan permisos sobre un determinado esquema, es decir que si le doy permisos sobre toda la base esto no ocurre, en ese sentido es similar a lo reportado por #31183. ### Screenshots/recordings This is what sql_lab shows me.  ### Superset version 4.1.1 ### Python version 3.10 ### Node version 16 ### Browser Chrome ### 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]
