sqlparse icon indicating copy to clipboard operation
sqlparse copied to clipboard

nested block comments are not correct parsed

Open aisbergde opened this issue 4 years ago • 1 comments

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)

aisbergde avatar Jan 20 '21 16:01 aisbergde

facing the same issue in the Superset (v1.0.1) in the SQL Lab editor

clear-m avatar Mar 12 '21 09:03 clear-m