xnuinside/simple-ddl-parser

create OR REPLACE transient/temporary TABLE not recognized by parser

devxor opened this issue · 8 comments

Describe the bug
"create OR REPLACE transient/temporary table" not recognized by parser.
Thx for quickly adding the support for "OR REPLACE TABLE"!
It seems that the "OR REPLACE" is only working with the "TABLE", but not with the Snowflake specific "TRANSIENT TABLE" or "TEMPORARY TABLE". However the support for snowflake's transient/temporary table is there e.g. "create TRANSIENT/TEMPORARY table" is working properly.
Snowflake Docs: Working with Temporary and Transient Tables

To Reproduce

CREATE OR REPLACE TRANSIENT TABLE someTable (
    someField VARCHAR(4)
)
CREATE OR REPLACE TEMPORARY TABLE someTable (
    someField VARCHAR(4)
)

Expected behavior
To get a proper output from the parser.

@devxor aha ) because they are not added as statements - will do it today!

Thx for the quick response!

@xnuinside Hi! Sorry for asking, but when you will have time for the fix? Thx!

@devxor sorry, didn't have a chance yesterday, will try today

@devxor it wasn't so fast as I expected )) need to work on it little bit today also

I will close the issue, will free open new) if you have some special DDL you need to parse - you can share it full & I will check if something didn't supported yet, and will add it

@xnuinside thank you very much! It's working now! :)