sqlparse
sqlparse copied to clipboard
nested block comments are not correct parsed
Try this input (it is valid in TSQL)
/* outer comment start
bla bla bla
/* inner comment */
select a from b
outer comment end */
create view dbo.c
as
e
from f
you get this output when removing comments
SELECT a
FROM b OUTER COMMENT END */
CREATE VIEW dbo.c AS e
FROM f
Also, when you not only format but try to parse the input the results are wrong (I think, because formating is based on parsing)
facing the same issue in the Superset (v1.0.1) in the SQL Lab editor