xnuinside/simple-ddl-parser

Multiple SERDEPROPERTIES fails

mikeskov opened this issue · 2 comments

Describe the bug
Entering multiple key/value pairs in SERDEPROPERTIES causes parsing to fail and return empty

To Reproduce
This works:

ddl="CREATE TABLE `x` (`a` STRING) ROW FORMAT SERDE 'my_serde' WITH SERDEPROPERTIES ( 'key1'='value1' )"
DDLParser(ddl,normalize_names=True).run(output_mode="hql")

This doesn't:

ddl="CREATE TABLE `x` (`a` STRING) ROW FORMAT SERDE 'my_serde' WITH SERDEPROPERTIES ( 'key1'='value1', 'key2'='value2' )"
DDLParser(ddl,normalize_names=True).run(output_mode="hql")

Expected behavior
Multiple key/value pairs in SERDEPROPERTIES should in the row format properties dict.

@mikeskov hi, thanks for reporting the issue, will work on it

@mikeskov hi again! fix released with version 0.26.1(https://pypi.org/project/simple-ddl-parser/), test added - https://github.com/xnuinside/simple-ddl-parser/blob/main/tests/test_hql_output_mode.py#L2203 if will be anything new - feel free to open new issue :) and thanks for report one more time!