Skip to content

Commit 363d27a

Browse files
authored
Merge pull request #275 from xnuinside/release_1.5.3
release 1.5.3
2 parents 5533ede + 7f139f2 commit 363d27a

File tree

15 files changed

+54830
-609
lines changed

15 files changed

+54830
-609
lines changed

CHANGELOG.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
**v1.5.2**
1+
**v1.5.3**
22
### Fixes
33

44
1. In Snowflake Fix unexpected behaviour when file_format name given - https://github.com/xnuinside/simple-ddl-parser/issues/273
5-
2.
5+
6+
7+
**v1.5.2**
8+
### Improvements
9+
#### MySQL
10+
1. Added support for COLLATE - https://github.com/xnuinside/simple-ddl-parser/pull/266/files
11+
612

713
**v1.5.1**
814
### Improvements

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ There is a lot of way how you can contribute to any project (not only in this),
3333

3434
- Add more tests to the code
3535

36-
It's always needed, I have only functional tests right now, so if you want to help wiht covering library for example, with unittests - please welcome, open the PR.
36+
It's always needed, I have only functional tests right now, so if you want to help with covering library for example, with unittests - please welcome, open the PR.
3737

3838
For ANY type of contributinon I will really really appritiate. Each of them are important.
3939

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -489,14 +489,18 @@ for help with debugging & testing support for BigQuery dialect DDLs:
489489
* https://github.com/kalyan939
490490

491491
## Changelog
492-
493-
**v1.5.2**
494-
492+
**v1.5.3**
495493
### Fixes
496494

497-
1. Fix Snowflake unexpected behaviour when file_format name given - https://github.com/xnuinside/simple-ddl-parser/issues/273
495+
1. In Snowflake Fix unexpected behaviour when file_format name given - https://github.com/xnuinside/simple-ddl-parser/issues/273
498496
2.
499497

498+
**v1.5.2**
499+
### Improvements
500+
#### MySQL
501+
1. Added support for COLLATE - https://github.com/xnuinside/simple-ddl-parser/pull/266/files
502+
503+
500504
**v1.5.1**
501505
### Improvements
502506
#### MySQL

docs/README.rst

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,8 @@ How to use
9696
Extract additional information from HQL (& other dialects)
9797
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9898

99-
In some dialects like HQL there is a lot of additional information about table like, fore example, is it external table,
100-
STORED AS, location & etc. This property will be always empty in 'classic' SQL DB like PostgreSQL or MySQL
101-
and this is the reason, why by default this information is 'hidden'.
102-
Also some fields are hidden in HQL, because they are simple not exists in HIVE, for example 'deferrable_initially'
99+
In some dialects like HQL there is a lot of additional information about table like, fore example, is it external table, STORED AS, location & etc. This property will be always empty in 'classic' SQL DB like PostgreSQL or MySQL and this is the reason, why by default this information are 'hidden'.
100+
Also some fields hidden in HQL, because they are simple not exists in HIVE, for example 'deferrable_initially'
103101
To get this 'hql' specific details about table in output please use 'output_mode' argument in run() method.
104102

105103
example:
@@ -557,6 +555,26 @@ for help with debugging & testing support for BigQuery dialect DDLs:
557555
Changelog
558556
---------
559557

558+
**v1.5.3**
559+
560+
Fixes
561+
^^^^^
562+
563+
564+
#. In Snowflake Fix unexpected behaviour when file_format name given - https://github.com/xnuinside/simple-ddl-parser/issues/273
565+
2.
566+
567+
**v1.5.2**
568+
569+
Improvements
570+
^^^^^^^^^^^^
571+
572+
MySQL
573+
~~~~~
574+
575+
576+
#. Added support for COLLATE - https://github.com/xnuinside/simple-ddl-parser/pull/266/files
577+
560578
**v1.5.1**
561579

562580
Improvements

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "simple-ddl-parser"
3-
version = "1.5.2"
3+
version = "1.5.3"
44
description = "Simple DDL Parser to parse SQL & dialects like HQL, TSQL (MSSQL), Oracle, AWS Redshift, Snowflake, MySQL, PostgreSQL, etc ddl files to json/python dict with full information about columns: types, defaults, primary keys, etc.; sequences, alters, custom types & other entities from ddl."
55
authors = ["Iuliia Volkova <xnuinside@gmail.com>"]
66
license = "MIT"

simple_ddl_parser/__init__.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
1-
from simple_ddl_parser.ddl_parser import DDLParser, DDLParserError, parse_from_file
1+
from simple_ddl_parser.ddl_parser import (
2+
DDLParser,
3+
DDLParserError,
4+
SimpleDDLParserException,
5+
parse_from_file,
6+
)
27
from simple_ddl_parser.output.dialects import dialect_by_name
38

49
supported_dialects = dialect_by_name
510

6-
__all__ = ["DDLParser", "parse_from_file", "DDLParserError", "supported_dialects"]
11+
__all__ = [
12+
"DDLParser",
13+
"parse_from_file",
14+
"DDLParserError",
15+
"supported_dialects",
16+
"SimpleDDLParserException",
17+
]

simple_ddl_parser/ddl_parser.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,15 @@
1616
Snowflake,
1717
SparkSQL,
1818
)
19-
# "DDLParserError" is an alias for backward compatibility
20-
from simple_ddl_parser.exception import SimpleDDLParserException as DDLParserError
19+
from simple_ddl_parser.exception import SimpleDDLParserException
2120
from simple_ddl_parser.parser import Parser
2221

2322

23+
# "DDLParserError" is an alias for backward compatibility
24+
class DDLParserError(SimpleDDLParserException):
25+
pass
26+
27+
2428
class Dialects(
2529
SparkSQL,
2630
Snowflake,

simple_ddl_parser/exception.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55

66
class SimpleDDLParserException(Exception):
7-
""" Base exception in simple ddl parser library """
8-
pass
7+
"""Base exception in simple ddl parser library"""
98

9+
pass

simple_ddl_parser/parsetab.py

Lines changed: 54630 additions & 488 deletions
Large diffs are not rendered by default.

simple_ddl_parser/utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import re
2-
from typing import List, Tuple, Optional, Union, Any
2+
from typing import Any, List, Optional, Tuple, Union
33

44
# Backward compatibility import
55
from simple_ddl_parser.exception import SimpleDDLParserException
@@ -10,10 +10,10 @@
1010
"find_first_unpair_closed_par",
1111
"normalize_name",
1212
"get_table_id",
13-
"SimpleDDLParserException"
13+
"SimpleDDLParserException",
1414
]
1515

16-
_parentheses = ('(', ')')
16+
_parentheses = ("(", ")")
1717

1818

1919
def remove_par(p_list: List[Union[str, Any]]) -> List[Union[str, Any]]:
@@ -59,9 +59,9 @@ def find_first_unpair_closed_par(str_: str) -> Optional[int]:
5959
"""
6060
count_open = 0
6161
for i, char in enumerate(str_):
62-
if char == '(':
62+
if char == "(":
6363
count_open += 1
64-
if char == ')':
64+
if char == ")":
6565
count_open -= 1
6666
if count_open < 0:
6767
return i

0 commit comments

Comments
 (0)