ERROR:
from sql_metadata import Parser
rawSQL1 = '''
with aa as --sdfsdfsdf
(SELECT * from table1)
SELECT * FROM aa
'''
tbls = Parser(rawSQL1).tables
NO ERROR:
from sql_metadata import Parser
rawSQL1 = '''
with aa --sdfsdfsdf
as
(SELECT * from table1)
SELECT * FROM aa
'''
tbls = Parser(rawSQL1).tables
Crashes if exist comment sign '--' after 'AS'
ERROR:
NO ERROR:
Crashes if exist comment sign '--' after 'AS'