Skip to content

Commit 0f93a11

Browse files
committed
release version 1.0.3
1 parent f6ad6ec commit 0f93a11

File tree

6 files changed

+50727
-462
lines changed

6 files changed

+50727
-462
lines changed

CHANGELOG.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
**v1.0.3**
22
### Improvements
33
1. Fixed bug with `CREATE OR REPLACE SCHEMA`.
4+
2. Added support of create empty tables without columns CREATE TABLE tablename (); (valid syntax in SQL)
45

56
### Snowflake
6-
1. Fixed bug with snowflake (stage_)fileformat option value equal a single string as `FIELD_OPTIONALLY_ENCLOSED_BY = '\"'`, `FIELD_DELIMITER = '|'`
7+
1. Fixed bug with snowflake `stage_` fileformat option value equal a single string as `FIELD_OPTIONALLY_ENCLOSED_BY = '\"'`, `FIELD_DELIMITER = '|'`
78
2. improve snowflake fileformat key equals value into dict. type.
89

910
**v1.0.2**

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,15 @@ for help with debugging & testing support for BigQuery dialect DDLs:
486486

487487

488488
## Changelog
489+
**v1.0.3**
490+
### Improvements
491+
1. Fixed bug with `CREATE OR REPLACE SCHEMA`.
492+
2. Added support of create empty tables without columns CREATE TABLE tablename (); (valid syntax in SQL)
493+
494+
### Snowflake
495+
1. Fixed bug with snowflake `stage_` fileformat option value equal a single string as `FIELD_OPTIONALLY_ENCLOSED_BY = '\"'`, `FIELD_DELIMITER = '|'`
496+
2. improve snowflake fileformat key equals value into dict. type.
497+
489498
**v1.0.2**
490499
### Improvements
491500
1. Fixed bug with places first table property value in 'authorization' key. Now it is used real property name.

docs/README.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,22 @@ for help with debugging & testing support for BigQuery dialect DDLs:
549549
Changelog
550550
---------
551551

552+
**v1.0.3**
553+
554+
Improvements
555+
^^^^^^^^^^^^
556+
557+
558+
#. Fixed bug with ``CREATE OR REPLACE SCHEMA``.
559+
#. Added support of create empty tables without columns CREATE TABLE tablename (); (valid syntax in SQL)
560+
561+
Snowflake
562+
^^^^^^^^^
563+
564+
565+
#. Fixed bug with snowflake ``stage_`` fileformat option value equal a single string as ``FIELD_OPTIONALLY_ENCLOSED_BY = '\"'``\ , ``FIELD_DELIMITER = '|'``
566+
#. improve snowflake fileformat key equals value into dict. type.
567+
552568
**v1.0.2**
553569

554570
Improvements

simple_ddl_parser/dialects/sql.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,6 +1016,7 @@ def p_expression_table(self, p: List) -> None: # noqa R701
10161016
"""expr : table_name defcolumn
10171017
| table_name LP defcolumn
10181018
| table_name
1019+
| table_name LP RP
10191020
| expr COMMA defcolumn
10201021
| expr COMMA
10211022
| expr COMMA constraint

simple_ddl_parser/parsetab.py

Lines changed: 50669 additions & 461 deletions
Large diffs are not rendered by default.

tests/test_simple_ddl_parser.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3421,3 +3421,33 @@ def test_non_int_type_paramteter():
34213421
"types": [],
34223422
}
34233423
assert results == expected
3424+
3425+
3426+
def test_create_empty_table_with_parentheses():
3427+
ddl = """
3428+
CREATE TABLE tablename ();
3429+
3430+
"""
3431+
result = DDLParser(ddl).run(group_by_type=True, output_mode="mysql")
3432+
3433+
expected = {
3434+
"ddl_properties": [],
3435+
"domains": [],
3436+
"schemas": [],
3437+
"sequences": [],
3438+
"tables": [
3439+
{
3440+
"alter": {},
3441+
"checks": [],
3442+
"columns": [],
3443+
"index": [],
3444+
"partitioned_by": [],
3445+
"primary_key": [],
3446+
"schema": None,
3447+
"table_name": "tablename",
3448+
"tablespace": None,
3449+
}
3450+
],
3451+
"types": [],
3452+
}
3453+
assert result == expected

0 commit comments

Comments
 (0)