serenajiang commented on issue #11310:
URL: 
https://github.com/apache/incubator-superset/issues/11310#issuecomment-712517374


   WITH statements also break if you name the temporary table `events`. Some 
reserved keyword issue?
   ```
   >>> sqlparse.parse("WITH events AS (SELECT 1 AS a) SELECT * FROM 
events")[0].get_type()
   'UNKNOWN'
   >>> sqlparse.parse("WITH not_events AS (SELECT 1 AS a) SELECT * FROM 
not_events")[0].get_type()
   'SELECT'
   ```
   
   I'm guessing these issues occur because the sql parser is for some really 
generic sql. Maybe we should default to allowing the query through if the 
parsed type is `UNKNOWN`? I know that could be dangerous, but these errors are 
really confusing to users and broke a number of our charts.
   


----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to