simple-ddl-parser
simple-ddl-parser copied to clipboard
array parsing in hql failes
Hi Found this bug provided test:
ddl = """
CREATE TABLE IF NOT EXISTS default.salesorderdetail(
column_abc ARRAY<string>,
)
"""
result = DDLParser(ddl, silent=False, normalize_names=True).run(output_mode="hql", group_by_type=True)
expected = {
"tables": [
{
"if_not_exists": True,
"columns": [
{
"name": "column_abc",
"type": "ARRAY <string>",
"size": None,
"references": None,
"unique": False,
"nullable": True,
"default": None,
"check": None,
}]
}]
}
assert expected == result
Error Message:
p = LexToken(RT,'ARRAY
def p_error(self, p):
if not self.silent:
raise DDLParserError(f"Unknown statement at {p}")
E simple_ddl_parser.ddl_parser.DDLParserError: Unknown statement at LexToken(RT,'ARRAY
@herokri thanks for reporting - will take a look on it on weekends
@xnuinside Any updates on this plz..?
@hanaluana , hi, I don’t have a time last several months because of personal issues. Didn’t work on it yet