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

feat: rename columns #2900

Open
talagluck opened this issue Apr 15, 2024 · 4 comments · May be fixed by #2906
Open

feat: rename columns #2900

talagluck opened this issue Apr 15, 2024 · 4 comments · May be fixed by #2906
Assignees
Labels
feat 🎇 New feature or request

Comments

@talagluck
Copy link
Contributor

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"
@talagluck talagluck added the bug 🐛 Something isn't working label Apr 15, 2024
@vrongmeal
Copy link
Contributor

Let me see if I can make this happen quickly.

@vrongmeal vrongmeal self-assigned this Apr 17, 2024
@vrongmeal
Copy link
Contributor

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 🤔

vrongmeal added a commit that referenced this issue Apr 18, 2024
This doesn't work since we need to update the delta metadata as well with
the updated schema which I haven't been able to figure out how...

Fixes: #2900

Signed-off-by: Vaibhav <vrongmeal@gmail.com>
@vrongmeal vrongmeal linked a pull request Apr 18, 2024 that will close this issue
@universalmind303
Copy link
Contributor

universalmind303 commented Apr 18, 2024

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

@universalmind303 universalmind303 added the feat 🎇 New feature or request label Apr 22, 2024
@universalmind303 universalmind303 changed the title BUG: ALTER TABLE not implemented feat: rename columns Apr 22, 2024
@universalmind303 universalmind303 removed the bug 🐛 Something isn't working label Apr 22, 2024
@universalmind303
Copy link
Contributor

reclassifying as "feature" as it's technically not a bug, but just missing functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat 🎇 New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants