xnuinside / simple-ddl-parser

Simple DDL Parser to parse SQL (HQL, TSQL, AWS Redshift, BigQuery, Snowflake and other dialects) ddl files to json/python dict with full information about columns: types, defaults, primary keys, etc. & table properties, types, domains, etc.
MIT License
180 stars 40 forks source link

AttributeError: 'NoneType' object has no attribute 'update' #149

Open ivbeg opened 2 years ago

ivbeg commented 2 years ago

Describe the bug AttributeError: 'NoneType' object has no attribute 'update' for certain SQL files

To Reproduce Steps to reproduce the behavior:

  1. Take file https://github.com/svn2github/oa-system/blob/c698a0c09bbd6b902700e9ccab7018470c538e70/tags/1.0.0/doc/dbchange_20081128.sql?raw=True
  2. Use code ddl = parse_from_file(filepath)
  3. See error AttributeError: 'NoneType' object has no attribute 'update' for certain SQL files

Expected behavior DDLParserError with a clear error explanation

More examples