mistercrunch commented on issue #3998: [SQLLab] Allow common table expressions 
(CTE), a.k.a. "with" statements
URL: 
https://github.com/apache/incubator-superset/issues/3998#issuecomment-377958794
 
 
   Currently we use Python's `sqlparse` to figure out the statement type, when 
it's a CTE, it says `UNKNOWN`.
   
   Here's where the current logic is:
   
https://github.com/apache/incubator-superset/blob/master/superset/sql_parse.py#L34
   
   It may be ok to look whether the query starts with a `WITH` token and 
confirm that no `DELETE` or `UPDATE` tokens are present in the query (as CTEs 
can be used in DML contexts).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to