feat: rename columns
talagluck opened this issue · 4 comments
Description
I'd like to be able to rename columns using ALTER TABLE
, but this appears to not be implemented.
I tried
alter table nyc_sales rename column "ease-ment" to "easement";
alter table nyc_sales rename "ease-ment" to "easement";
And I get
Query failed to run.
SQL statement currently unsupported: RENAME COLUMN "ease-ment" TO "easement"
Let me see if I can make this happen quickly.
I did add the functionality. We get the schema from delta snapshot which causes discrepancy. Delta or any other backend would maintain its own schema which might be a bit harder to deal with right now 🤔
FWIW, deltalake does support RENAME COLUMN
and it's even in the official implementation, but it doesn't look like it's made it's way into delta-rs yet.
It's currently marked as experimental, but it's also been in since 1.2.0 (they're on 3.1.0). So we'll probably need to upstream the functionality to delta-rs
reclassifying as "feature" as it's technically not a bug, but just missing functionality.