Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The project cannot parse the CREATE TEMPORARY statement. #538

Open
ZC-TZ opened this issue Dec 23, 2024 · 0 comments
Open

The project cannot parse the CREATE TEMPORARY statement. #538

ZC-TZ opened this issue Dec 23, 2024 · 0 comments
Labels

Comments

@ZC-TZ
Copy link

ZC-TZ commented Dec 23, 2024

sql = "create temporary table M_ZJM_qy2 DISTRIBUTED BY('B_dkhth') select B_dkhth,B_khh,CONCAT(F,F_jjbh,F_bz,F_jjje,F_jjye,F_fkrq,F_fkdqr,rtrim(F_dkywzl),F_dkxs,F_dkxz,F_dktx,F_dkzl,F_zqbz,F_sjfl,F_wjfl) F from m_zjm_dkywxx_f where beiz = '' and B_dkhth <> '' and B_dkhth = any(select B_dkhth from M_ZJM_qy1)"

# use SQL Metadata Parser
parser = Parser(sql)

print("Tables:", parser.tables)  # get Tables
print("Columns:", parser.columns)  # get Columns
print("Tokens:", parser.tokens)  # get Tokens

When running the above statement, an error will occur:
ValueError: Not supported query type!

I think this error is caused by the CREATE TEMPORARY keyword. When only using CREATE, the error does not occur.

@macbre macbre added the bug label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants