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: Change type of a column from SQL #257

Closed
5 tasks
bluestreak01 opened this issue Apr 30, 2020 · 0 comments · Fixed by #4413
Closed
5 tasks

Feature: Change type of a column from SQL #257

bluestreak01 opened this issue Apr 30, 2020 · 0 comments · Fixed by #4413
Labels
New feature Feature requests SQL Issues or changes relating to SQL execution
Projects

Comments

@bluestreak01
Copy link
Member

bluestreak01 commented Apr 30, 2020

Describe the solution you'd like
I would like to be able to change the type of a column from SQL, possibly with an expression similar to ALTER COLUMN.

Additional context
Current SQL for adding an index to an existing column:

ALTER TABLE trades ALTER COLUMN instrument ADD INDEX;

implementation

This can be broken down into tasks

  • Save column order in table _metadata that is used in SELECT * queries
  • Support of SQL syntax and create AlterOperation
  • Support of changing the column type as a single transaction in TableWriter. This will add the column of the new type, copy the data into it, drop the old column, and change the order of SELECT * columns in metadata.
  • Support of the column type change in WAL writers
  • Support of the column type update in WAL ILP writing pipelines
@bluestreak01 bluestreak01 added the New feature Feature requests label Apr 30, 2020
@bluestreak01 bluestreak01 added this to To do in QuestDB Roadmap Apr 30, 2020
@bsmth bsmth added the SQL Issues or changes relating to SQL execution label Feb 17, 2021
@bsmth bsmth changed the title Column type change Feature: Change type of a column from SQL Feb 17, 2021
@bluestreak01 bluestreak01 removed this from To do in QuestDB Roadmap Jun 21, 2021
@bluestreak01 bluestreak01 added this to To do in Storage via automation Jun 21, 2021
@questdb questdb deleted a comment from ideoma Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New feature Feature requests SQL Issues or changes relating to SQL execution
Projects
No open projects
Storage
To do
Development

Successfully merging a pull request may close this issue.

2 participants