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

Feature: ADD IF NOT EXISTS and DROP IF EXISTS to ALTER TABLE command #4583

Closed
prrao87 opened this issue Dec 2, 2024 · 0 comments · Fixed by #4598
Closed

Feature: ADD IF NOT EXISTS and DROP IF EXISTS to ALTER TABLE command #4583

prrao87 opened this issue Dec 2, 2024 · 0 comments · Fixed by #4598
Labels
feature New features or missing components of existing features

Comments

@prrao87
Copy link
Member

prrao87 commented Dec 2, 2024

API

Other

Description

Currently, we need custom application logic to check for the presence of a column when we use ALTER TABLE. See the example below where I'm trying to add a vector column of type DOUBLE[1536] to an existing Movie table:

ALTER TABLE Movie ADD vector DOUBLE[1536];

It's easy to imagine a scenario where the user has many columns in a table during application development and they may want to have the error handled by the DDL itself.

Requested feature

For adding a new column:

ALTER TABLE Movie ADD IF NOT EXISTS vector DOUBLE[1536];

For dropping an existing column:

ALTER TABLE Movie DROP IF EXISTS vector;
@prrao87 prrao87 added the feature New features or missing components of existing features label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New features or missing components of existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant