Skip to content

AttributeError: 'NoneType' object has no attribute 'normalized' #390

@dimkuz

Description

@dimkuz

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions