[MCOL-2125] BEFORE/AFTER keyword to add column in middle of table Created: 2019-01-29  Updated: 2023-07-02  Resolved: 2023-07-02

Status: Closed
Project: MariaDB ColumnStore
Component/s: N/A
Affects Version/s: None
Fix Version/s: Icebox

Type: New Feature Priority: Minor
Reporter: Muhammad Irfan Assignee: Todd Stoffel (Inactive)
Resolution: Won't Do Votes: 1
Labels: beginner-friendly

Issue Links:
Relates
relates to MCOL-4267 ADD COLUMN AFTER throws syntax error Open
relates to MCOL-4663 CLONE - ALTER TABLE doesn't support A... Closed

 Description   

I noticed we don't have BEFORE/AFTER keyword for columnstore table to add column at specific position. It would be nice if we have this option in columnstore table like in InnoDB engine.
That's how it works in InnoDB.

MariaDB [abc]> CREATE TABLE innodb_test ( A int, C int) ENGINE=InnoDB;
Query OK, 0 rows affected (0.02 sec)

MariaDB [abc]> ALTER TABLE innodb_test ADD COLUMN B INT AFTER A;
Query OK, 0 rows affected (0.02 sec)
Records: 0 Duplicates: 0 Warnings: 0

MariaDB [abc]> show create table innodb_test\G
Table: cs_test
Create Table: CREATE TABLE `cs_test` (
`A` int(11) DEFAULT NULL,
`B` int(11) DEFAULT NULL,
`C` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8

while the same error out in CS engine.

ALTER TABLE cs_test ADD COLUMN B INT AFTER A;
ERROR 1178 (42000): The storage engine for the table doesn't support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types.



 Comments   
Comment by Roman [ 2019-03-15 ]

This is cosmetic only change b/c there is no difference in a column position in Columnstore b/c CS is a columnar-oriented engine.

Comment by Todd Stoffel (Inactive) [ 2023-07-02 ]

The "create date" on this ticket is pre-convergence with MariaDB server. If the issue still exists in a modern version of the engine/plugin please submit a new ticket.

Generated at Thu Feb 08 02:33:55 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.