xnuinside/simple-ddl-parser

keep "<" and ">" special char in columns names when properly quoted

gtanzi opened this issue · 3 comments

First of all, wanna compliment you for this helpful tool!

I came into a (possibly?) minor bug when trying to parse an hql file containing column names with special characters "<" or ">" properly quoted like:
something<2% float
I found out this is due to "parser.pre_process_line" that insert spaces around "<" and ">" if "(" not in line.
Possible solution is not to insert spaces if "<" ">" are inbetween quotes.

@gtanzi , hi! Thanks for warm words and reporting the issue. I will be back from vacation on 8 of November and will take a look :) thank you!

@gtanzi about spaces - I added them because of some issues with parsing HQL structures like this - ARRAYstructcolx:string,coly:string. I will work on more normal workaround and will try to remove it.

@gtanzi sorry that it took so much time - worked on another issues, I fixed this problem in 0.22.5 (already released - https://pypi.org/project/simple-ddl-parser/). https://github.com/xnuinside/simple-ddl-parser/blob/main/tests/test_hql_output_mode.py#L1888 - test added. Feel free to open the new issue if needed something. Thank you!