sqlglot
sqlglot copied to clipboard
Alter table does not handle `ADD PARTITION`
I would expect this syntax to do a roundtrip successfully:
>>> sqlglot.parse_one("ALTER TABLE foo ADD PARTITION(event='click')").sql()
"ALTER TABLE foo PARTITION(event = 'click')"
but it drops the ADD portion. This is valid syntax in spark (where I ran into it) so it at least needs to be added to that dialect.
What is the input dialect?
@georgesittas the code is a repro as is in a clean session.
but if you want a dialect then as I said in the comment, use spark
Ah apologies, I missed it. Will take a look, thanks.
@georgesittas thank you so much for fixing this!!! ❤