How do you change a column from NULL to NOT NULL in memSQL

How do you change a column from NULL to NOT NULL in memSQL.

I have created the table as below.

create table t_tinyint1(c TINYINT,c2 VARCHAR(100), key() USING CLUSTERED COLUMNSTORE);

Trying to alter but no luck

ALTER TABLE t_tinyint1 modify c2 VARCHAR(100) not null ;

Facing the below error.

SQL Error [1890] [HY000]: This version of MemSQL cannot perform an offline ALTER TABLE on a COLUMN STORE table. The requested ALTER TABLE cannot be performed online because it modifies column c2 from NULL to NOT NULL.

Consider adding a new column with the desired type, updating it with the new data, then dropping the old one. After that, rename the new column to the original column name. Could take a long time for a large table, but it should work.

Is there any option using ALTER statement?

It’s not supported yet. We have a feature request tracking this. I’ve taken note of your feedback. Thank you.

I believe this process is same for both row-store table and column-store tables. Please correct me.

can be used for rowstores to change a column data type, but not the nullability setting.

Hey Hanson, was this feature ever added?


Hi Nick. No, it’s still on the backlog. -Eric

Hi hanson,

Is this feature got added or its still in backlog ?