superset-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [incubator-superset] nytai edited a comment on pull request #9692: [sqllab] fix, strip comments before parsing statements
Date Fri, 01 May 2020 17:37:37 GMT

nytai edited a comment on pull request #9692:

   The issue is that `sqlparse` is returning 2 statements when the statements look like 
   select * from table;
   -- comment
   I suspect is splits along the `;`.
   [The logic that determines if the statement is DML](
is just checking that all statements are "SELECT" or "EXPLAIN". The second statement is a
comment, hence it's not SELECT|EXPLAIN, therefore it fails the 'is DML' test. What this PR
does is it strips comments before feeding the statements to `sqlparse` so we're only parsing
actual SQL statements and not comments. 

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:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message